Borderou de evaluare (job #2983998)

Utilizator Alexco2003Codarcea Alexandru-Christian Alexco2003 Data 23 februarie 2023 13:15:17
Problema Sortare prin comparare Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:8:37: error: 'v' has not been declared 8 | void mergesort(int left, int right, v[]) | ^ main.cpp: In function 'void mergesort(int, int, int*)': main.cpp:11:5: error: 'mid' was not declared in this scope 11 | mid=(left+right)/2; | ^~~ main.cpp:12:24: error: 'v' was not declared in this scope 12 | mergesort(left,mid,v[]); | ^ main.cpp:12:26: error: expected primary-expression before ']' token 12 | mergesort(left,mid,v[]); | ^ main.cpp:13:29: error: expected primary-expression before ']' token 13 | mergesort(mid+1,right,v[]); | ^ main.cpp:29:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation] 29 | for (;i<=mid;i++) | ^~~ main.cpp:31:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for' 31 | for (;j<=right;j++) | ^~~ main.cpp: In function 'int main()': main.cpp:47:13: warning: unused variable 'cnt' [-Wunused-variable] 47 | int n,i,cnt=1; | ^~~ Non zero exit status: 1

Ceva nu functioneaza?