Borderou de evaluare (job #2308716)

Utilizator stan_flaviusStan Flavius Stefan stan_flavius Data 27 decembrie 2018 17:20:47
Problema Arbori de intervale Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:10:14: warning: integer overflow in expression [-Woverflow] int tree[nmax*nmax]; ^ main.cpp:10:19: error: overflow in constant expression int tree[nmax*nmax]; ^ main.cpp:10:19: error: size of array 'tree' is too large main.cpp: In function 'void BuildTree(int, int, int, int, int)': main.cpp:13:20: error: 'tree' was not declared in this scope { if(left==right) {tree[node]=val; return;} ^~~~ main.cpp:17:3: error: 'tree' was not declared in this scope tree[node]=max(tree[node*2],tree[node*2+1]); ^~~~ main.cpp: In function 'void ChangeVal(int, int, int, int, int)': main.cpp:21:32: error: 'tree' was not declared in this scope { if(left==pos && right==pos) {tree[node]=val; return; } ^~~~ main.cpp:25:3: error: 'tree' was not declared in this scope tree[node]=max(tree[node*2],tree[node*2+1]); ^~~~ main.cpp: In function 'void Max(int, int, int, int, int, int&)': main.cpp:30:11: error: 'tree' was not declared in this scope { if(tree[node]>mx) mx=tree[node]; ^~~~ Non zero exit status: 1

Ceva nu functioneaza?