Problem weddingcoins
User TheInvadr
Submission Time 2023-01-07 19:46:23
Score 0
Max Time N/A
Max Memory N/A

Compile Error

weddingcoins.cpp: In function ‘int main()’:
weddingcoins.cpp:11:34: error: ‘INT_MAX’ was not declared in this scope
11 | for(int i = 1;i<=n;i++)dp[i]=INT_MAX;
| ^~~~~~~
weddingcoins.cpp:2:1: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
1 | #include <iostream>
+++ |+#include <climits>
2 | using namespace std;
weddingcoins.cpp:17:25: error: ‘INT_MAX’ was not declared in this scope
17 | if(sub!=INT_MAX&&sub+1<dp[i])dp[i]=sub+1;
| ^~~~~~~
weddingcoins.cpp:17:25: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?