Problem choosingcandies
User neoaix
Submission Time 2026-06-25 07:53:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

cc1plus: error: ‘::main’ must return ‘int’
choosingcandies.cpp: In function ‘int main()’:
choosingcandies.cpp:6:30: error: ‘n’ was not declared in this scope
6 | for (long long i = 0 ; i<n ; i++){
| ^
choosingcandies.cpp:7:37: error: expected ‘;’ before ‘)’ token
7 | for (long long j = i+1 ; j++ ){
| ^~
| ;
choosingcandies.cpp:8:16: error: ‘arr’ was not declared in this scope
8 | if(arr[i] + arr[j] >= x) res++ ;
| ^~~
choosingcandies.cpp:8:35: error: ‘x’ was not declared in this scope
8 | if(arr[i] + arr[j] >= x) res++ ;
| ^