Problem choosingcandies
User Teohzijia
Submission Time 2026-06-24 16:32:02
Score 0
Max Time N/A
Max Memory N/A

Compile Error

choosingcandies.cpp: In function ‘int main()’:
choosingcandies.cpp:5:1: error: ‘cin’ was not declared in this scope
5 | cin>>n>>k;
| ^~~
choosingcandies.cpp:6:5: error: ‘vector’ was not declared in this scope
6 | vector<int>A(n);
| ^~~~~~
choosingcandies.cpp:1:13: error: expected primary-expression before ‘long’
1 | #define int long long
| ^~~~
choosingcandies.cpp:6:12: note: in expansion of macro ‘int’
6 | vector<int>A(n);
| ^~~
choosingcandies.cpp:8:14: error: ‘A’ was not declared in this scope
8 | cin>>A[i];
| ^
choosingcandies.cpp:15:17: error: ‘A’ was not declared in this scope
15 | sum=A[i]+A[j];
| ^
choosingcandies.cpp:19:7: error: ‘cout’ was not declared in this scope
19 | } cout<<x;
| ^~~~