Problem coke
User PerihelionfromAphelion
Submission Time 2026-08-16 18:31:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

coke.cpp: In function ‘int main()’:
coke.cpp:12:10: error: ‘c’ was not declared in this scope
12 | cin >> c[i];
| ^
coke.cpp:15:10: error: ‘s’ was not declared in this scope
15 | cin >> s[i];
| ^
coke.cpp:19:15: error: ‘c’ was not declared in this scope
19 | cokes[i] = {c[i], s[i]};
| ^
coke.cpp:19:21: error: ‘s’ was not declared in this scope
19 | cokes[i] = {c[i], s[i]};
| ^
coke.cpp:19:25: error: no match for ‘operator=’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type’ {aka ‘std::pair<int, int>’} and ‘<brace-enclosed initializer list>’)
19 | cokes[i] = {c[i], s[i]};
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/specfun.h