straps.cpp:6:1: error: 'pair' does not name a type
pair<long long,int> rope[N];
^~~~
straps.cpp: In function 'int main()':
straps.cpp:8:2: error: 'ios_base' has not been declared
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
^~~~~~~~
straps.cpp:8:32: error: 'cin' was not declared in this scope
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
^~~
straps.cpp:8:32: note: suggested alternative: 'main'
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
^~~
main
straps.cpp:8:44: error: 'cout' was not declared in this scope
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
^~~~
straps.cpp:10:31: error: 'rope' was not declared in this scope
for(int i=1;i<=n;i++) cin >> rope[i].fi >> rope[i].se;
^~~~
straps.cpp:16:7: error: 'rope' was not declared in this scope
sort(rope+1, rope+1+n);
^~~~
straps.cpp:16:2: error: 'sort' was not declared in this scope
sort(rope+1, rope+1+n);
^~~~
straps.cpp:16:2: note: suggested alternative: 'short'
sort(rope+1, rope+1+n);
^~~~
short
straps.cpp:19:27: error: 'min' was not declared in this scope
dp[i][j] = max(dp[i-1][min(n, j + rope[i].fi - 1)], dp[i-1][j-1]) + rope[i].se;
^~~
straps.cpp:19:27: note: suggested alternative: 'main'
dp[i][j] = max(dp[i-1][min(n, j + rope[i].fi - 1)], dp[i-1][j-1]) + rope[i].se;
^~~
main
straps.cpp:19:15: error: 'max' was not declared in this scope
dp[i][j] = max(dp[i-1][min(n, j + rope[i].fi - 1)], dp[i-1][j-1]) + rope[i].se;
^~~
straps.cpp:19:15: note: suggested alternative: 'main'
dp[i][j] = max(dp[i-1][min(n, j + rope[i].fi - 1)], dp[i-1][j-1]) + rope[i].se;
^~~
main
straps.cpp:23:10: error: 'max' was not declared in this scope
cout << max(dp[n][0], dp[n][1]);
^~~
straps.cpp:23:10: note: suggested alternative: 'main'
cout << max(dp[n][0], dp[n][1]);
^~~
main