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

Compile Error

stickytape.cpp: In function ‘int main()’:
stickytape.cpp:15:14: error: lvalue required as left operand of assignment
15 | if (M % 2 = 0) {
| ^
stickytape.cpp:17:34: error: ‘n’ was not declared in this scope
17 | pair <int, int> p = {nv[i], nv[n+i];
| ^
stickytape.cpp:17:38: error: expected ‘}’ before ‘;’ token
17 | pair <int, int> p = {nv[i], nv[n+i];
| ~ ^
stickytape.cpp:17:38: error: could not convert ‘{nv.std::vector<int>::operator[](((std::vector<int>::size_type)i)), <expression error>}’ from ‘<brace-enclosed initializer list>’ to ‘std::pair<int, int>’
stickytape.cpp:19:4: error: expected ‘}’ before ‘else’
19 | } else if (M == 1) {sum == 0;}
| ^~~~
stickytape.cpp:15:17: note: to match this ‘{’
15 | if (M % 2 = 0) {
| ^
stickytape.cpp:20:19: