Problem stamps
User Schzeey
Submission Time 2023-03-16 01:54:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

stamps.cpp: In function ‘pii dp(int, int, int*)’:
stamps.cpp:15:37: error: assignment of read-only location ‘*(dp + (((sizetype)i) + ((sizetype)j)))’
15 | if (j == 0) return dp[i][j] = {0, 1};
| ~~~~~~~~~^~~~~~~~
stamps.cpp:16:30: error: assignment of read-only location ‘*(dp + (((sizetype)i) + ((sizetype)j)))’
16 | else return dp[i][j] = {INT_MAX, 0};
| ~~~~~~~~~^~~~~~~~~~~~~~
stamps.cpp:18:38: error: could not convert ‘*(dp + (((sizetype)i) + ((sizetype)j)))’ from ‘pii(int, int, int*)’ {aka ‘std::pair<int, int>(int, int, int*)’} to ‘pii’ {aka ‘std::pair<int, int>’}
18 | if (dp[i][j] != 0) return dp[i][j];
| ~~~~~~~^
| |
| pii(int, int, int*) {aka std::pair<int, int>(int, int, int*)}
stamps.cpp:20:21: error: assignment of rea