Problem stickytape
User WANCH5789W
Submission Time 2026-05-31 10:37:37
Score 0
Max Time N/A
Max Memory N/A

Compile Error

stickytape.cpp: In function ‘int main()’:
stickytape.cpp:21:46: error: expected ‘;’ before ‘pair’
21 | for (int i = 0; i < M-3; i++){ cin >> nv[i]
| ^
| ;
22 | pair <int, int> p = {nv[i], nv[n+i]};
| ~~~~
stickytape.cpp:23:11: error: ‘p’ was not declared in this scope
23 | sum += p.first + p.second;
| ^
stickytape.cpp:30:1: error: expected ‘}’ at end of input
30 | }
| ^
stickytape.cpp:7:13: note: to match this ‘{’
7 | int main () {
| ^