prog.cpp: In function ‘int findans(int, int, int)’:
prog.cpp:15:22: error: ‘INT_MAX’ was not declared in this scope
return INT_MAX;
^~~~~~~
prog.cpp:15:22: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
prog.cpp:1:1:
+#include <climits>
int n;
prog.cpp:15:22:
return INT_MAX;
^~~~~~~
prog.cpp:22:18: error: ‘INT_MAX’ was not declared in this scope
int ans = INT_MAX;
^~~~~~~
prog.cpp:22:18: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
prog.cpp:28:28: error: ‘min’ was not declared in this scope
ans = min(findans(j - 1, j, m) + (cord[prev] - cord[j]) * (cost[j]), ans);
^~~
prog.cpp:34:39: error: ‘min’ was not declared in this scope
int res = min(findans(j - 1, prev, m - 1), findans(j - 1, j, m) + (cord[prev] - cord[j]) * (cost[j]));
^~~
prog.cpp:38:35: error: ‘min’ was not declared in this scope
ans = min(ans, findans(j - 1, j, m) + (cord[prev] - cord[j]) * (cost[j]));
^~~
prog.cpp: In function ‘void solve()’:
prog.cpp:46:8: error: ‘cin’ was not declared in this scope
cin >> n >> d >> m;
^~~
prog.cpp:56:8: error: ‘memset’ was not declared in this scope
memset(dp, -1, sizeof(dp));
^~~~~~
prog.cpp:56:8: note: ‘memset’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
prog.cpp:1:1:
+#include <cstring>
int n;
prog.cpp:56:8:
memset(dp, -1, sizeof(dp));
^~~~~~
prog.cpp:59:8: error: ‘cout’ was not declared in this scope
cout << ans << endl;
^~~~
prog.cpp:59:8: note: suggested alternative: ‘cost’
cout << ans << endl;
^~~~
cost
prog.cpp:59:23: error: ‘endl’ was not declared in this scope
cout << ans << endl;
^~~~
prog.cpp:59:23: note: suggested alternative: ‘enum’
cout << ans << endl;
^~~~
enum