Borderou de evaluare (job #789839)

Utilizator avatar BSMarian123 cretu marian-dumitru BSMarian123 IP ascuns
Problemă Asort (baraj gimnaziu) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 15 oct. 2024 12:49:57 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:28:9: error: expected '}' before 'else' 28 | else | ^~~~ main.cpp:24:24: note: to match this '{' 24 | } else if (P == 2) { | ^ main.cpp:25:19: warning: unused variable 'succ' [-Wunused-variable] 25 | int pred, succ; | ^~~~ main.cpp:26:13: warning: unused variable 'idx' [-Wunused-variable] 26 | int idx = find(X.begin(), X.end(), T) - X.begin(); | ^~~ main.cpp:29:13: error: 'pred' was not declared in this scope; did you mean 'pread'? 29 | pred = X[idx - 1]; | ^~~~ | pread main.cpp:29:22: error: 'idx' was not declared in this scope 29 | pred = X[idx - 1]; | ^~~ main.cpp:30:13: error: 'idx' was not declared in this scope 30 | if (idx == N - 1) | ^~~ main.cpp:31:13: error: 'succ' was not declared in this scope 31 | succ = X[0]; | ^~~~ main.cpp:33:13: error: 'succ' was not declared in this scope 33 | succ = X[idx + 1]; | ^~~~ main.cpp:35:17: error: 'pred' was not declared in this scope; did you mean 'pread'? 35 | fout << pred << " " << succ << '\n'; | ^~~~ | pread main.cpp:35:32: error: 'succ' was not declared in this scope 35 | fout << pred << " " << succ << '\n'; | ^~~~ main.cpp: At global scope: main.cpp:38:5: error: 'fin' does not name a type 38 | fin.close(); | ^~~ main.cpp:39:5: error: 'fout' does not name a type 39 | fout.close(); | ^~~~ main.cpp:40:5: error: expected unqualified-id before 'return' 40 | return 0; | ^~~~~~ main.cpp:41:1: error: expected declaration before '}' token 41 | } | ^