EXP8 CC
EXP8 CC
EXP8 CC
Experiment 8 Dynamic
Programming
#include <bits/stdc++.h>
int Inv(int a)
} return
res;
int main() {
int n;
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
int k; int x; cin >> n >> k >> x; int res1 = 1, res0 = 0; for
res0 = nres0;
}
if (x == 1) printf("%d\n", res1); else { int
printf("%d\n", res);
}
return 0;
• Result/Output/Writing Summary
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
#define MAX_N 10005
int tests,n,answer,s;
int h[MAX_N],minn;
int find_min(int x) {
int tmp = x / 5;
if (tmp >= 1) {
return res;
int main() {
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
scanf("%d", &tests);
scanf("%d", &n);
minn = INF;
scanf("%d", &h[i]);
answer = INF;
s = 0;
printf("%d\n", answer);
return 0;
• Result/Output/Writing Summary
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING