Borderou de evaluare (job #2571746)

Utilizator vladadAndries Vlad Andrei vladad Data 5 martie 2020 09:54:19
Problema Lowest Common Ancestor Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:10:12: error: expected ']' before numeric constant int nivel[[100001]; ^~~~~~ main.cpp: In function 'void dfs(int)': main.cpp:17:5: error: 'euler' was not declared in this scope euler[m]=nod; ^~~~~ main.cpp:18:5: error: 'lvl' was not declared in this scope lvl[nod]=m; ^~~ main.cpp:19:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0; i<v[nod].size(); i++) ~^~~~~~~~~~~~~~ main.cpp:25:16: error: invalid types 'int[int]' for array subscript nivel[m]=lvl[nod]; ^ main.cpp: In function 'void build()': main.cpp:37:33: error: invalid types 'int[int]' for array subscript if(nivel[rmq[i-1][j]]<nivel[rmq[i-1][j+(1<<(i-1)]]) ^ main.cpp:37:61: error: expected ')' before ']' token if(nivel[rmq[i-1][j]]<nivel[rmq[i-1][j+(1<<(i-1)]]) ^ main.cpp:38:37: error: expected ']' before ';' token rmq[i][j]=rmq[i-1][j]; ^ main.cpp:38:37: error: expected ']' before ';' token main.cpp:38:37: error: invalid types 'int[int]' for array subscript main.cpp:38:37: error: expected ')' before ';' token main.cpp: In function 'int LCA(int, int)': main.cpp:50:22: error: expected primary-expression before ']' token if(nivel[rmq[ln][]]) ^ main.cpp:51:1: error: expected primary-expression before '}' token } ^ main.cpp:49:9: warning: unused variable 'ans' [-Wunused-variable] int ans=rmq[ln][a]; ^~~ main.cpp:51:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ Non zero exit status: 1

Ceva nu functioneaza?