Problem squidzofrenzic
User hackerman123
Submission Time 2023-03-15 16:16:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

squidzofrenzic.cpp: In function ‘int binary_search(long long int, long long int, int, int)’:
squidzofrenzic.cpp:14:14: error: ‘v’ was not declared in this scope
14 | if (sum + v[last_index] > top){
| ^
squidzofrenzic.cpp:15:10: error: expected ‘;’ before ‘}’ token
15 | break
| ^
| ;
16 | }else{
| ~
squidzofrenzic.cpp:22:2: error: expected ‘,’ or ‘;’ before ‘for’
22 | for (int i = last_index; i < size; i++){
| ^~~
squidzofrenzic.cpp:22:27: error: ‘i’ was not declared in this scope
22 | for (int i = last_index; i < size; i++){
| ^
squidzofrenzic.cpp: In function ‘int main()’:
squidzofrenzic.cpp:39:32: error: expected ‘;’ before ‘v’
39 | long long input; cin >> input
| ^
| ;
40 | v[i] = input;