Borderou de evaluare (job #2958691)

Utilizator ingrid2328Nagy Ingrid ingrid2328 Data 27 decembrie 2022 20:07:36
Problema Partitie Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:8:20: error: expected ']' before ';' token 8 | #define LEN 300002; | ^ main.cpp:17:6: note: in expansion of macro 'LEN' 17 | nr v[LEN]={{0,0}}; | ^~~ main.cpp:17:9: error: expected unqualified-id before ']' token 17 | nr v[LEN]={{0,0}}; | ^ main.cpp:8:20: error: expected ']' before ';' token 8 | #define LEN 300002; | ^ main.cpp:18:9: note: in expansion of macro 'LEN' 18 | int sol[LEN]={0}; | ^~~ main.cpp:18:12: error: expected unqualified-id before ']' token 18 | int sol[LEN]={0}; | ^ main.cpp: In function 'int main()': main.cpp:28:14: error: 'v' was not declared in this scope 28 | fin>>v[i].val; | ^ main.cpp:31:11: error: 'v' was not declared in this scope 31 | sort (v+1, v+n+1, [](nr v, nr b) { | ^ main.cpp:38:15: error: 'sol' was not declared in this scope 38 | if ( (sol [ v[i].poz ] )==0) | ^~~ main.cpp:44:27: error: 'sol' was not declared in this scope 44 | while ( j<=n && ( sol[v[j].poz]>0 || v[j].val<v[i].val+d ) ) {j++;} | ^~~ main.cpp:45:43: error: 'sol' was not declared in this scope 45 | if (j<=n && v[j].val-v[i].val>=d) sol[v[j].poz]=nrprt; | ^~~ main.cpp:48:32: error: 'sol' was not declared in this scope 48 | for (i=1; i<=n; i++) fout<<sol[i]<<endl; | ^~~ Non zero exit status: 1

Ceva nu functioneaza?