Borderou de evaluare (job #3296140)

Utilizator GRIND_to_ONIMedvichi Darius GRIND_to_ONI Data 11 mai 2025 18:31:39
Problema Transport Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int f(int)': main.cpp:9:21: error: expected initializer before numeric constant 9 | int incarcatura 0, transporturi = 1; | ^ main.cpp:10:23: error: 'n' was not declared in this scope 10 | for(int i=1; i <= n; i++) | ^ main.cpp:12:9: error: 'incarcatura' was not declared in this scope 12 | incarcatura += v[i]; | ^~~~~~~~~~~ main.cpp:12:24: error: 'v' was not declared in this scope 12 | incarcatura += v[i]; | ^ main.cpp:15:13: error: 'transporturi' was not declared in this scope 15 | transporturi ++; | ^~~~~~~~~~~~ main.cpp:19:12: error: 'transporturi' was not declared in this scope 19 | return transporturi; | ^~~~~~~~~~~~ main.cpp: In function 'int main()': main.cpp:24:12: error: 'n' was not declared in this scope 24 | cin >> n >> k; | ^ main.cpp:24:17: error: 'k' was not declared in this scope 24 | cin >> n >> k; | ^ main.cpp:27:16: error: 'v' was not declared in this scope 27 | cin >> v[i]; | ^ main.cpp:28:19: error: 'maxim' was not declared in this scope 28 | if(v[i] > maxim) | ^~~~~ main.cpp:31:12: error: expected initializer before 'maxim' 31 | int st maxim, dr 256000000; | ^~~~~ main.cpp:32:16: error: 'dr' was not declared in this scope 32 | while(st < dr) | ^~ main.cpp:32:11: error: 'st' was not declared in this scope; did you mean 'std'? 32 | while(st < dr) | ^~ | std main.cpp:34:9: error: 'mij' was not declared in this scope 34 | mij = (st + dr) / 2; | ^~~ main.cpp:35:9: error: 'else' without a previous 'if' 35 | else if(f(mij) <= k) dr = mij; | ^~~~ main.cpp:38:13: error: 'st' was not declared in this scope; did you mean 'std'? 38 | cout << st << endl; Non zero exit status: 1

Ceva nu functioneaza?