Borderou de evaluare (job #2170994)
Utilizator | Data | 15 martie 2018 10:45:48 | |
---|---|---|---|
Problema | Cautare binara | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:3:7: error: ‘N’ was not declared in this scope
int v[N], n;
^
user.cpp: In function ‘int caut0(int)’:
user.cpp:6:27: error: ‘L’ was not declared in this scope
int r = 0, pas = 1 << L;
^
user.cpp:8:28: error: ‘v’ was not declared in this scope
if(r + pas <= n && v[r + pas] <= x){
^
user.cpp:13:18: error: ‘v’ was not declared in this scope
if(r == 0 || v[r] < x){ ///folosim doar daca nu il cautam pe 1
^
user.cpp: In function ‘int caut1(int)’:
user.cpp:22:27: error: ‘L’ was not declared in this scope
int r = 0, pas = 1 << L;
^
user.cpp:24:28: error: ‘v’ was not declared in this scope
if(r + pas <= n && v[ r + pas ] <= x){
^
user.cpp: In function ‘int caut2(int)’:
user.cpp:35:5: error: expected unqualified-id before ‘while’
while(pas != 0){
^
user.cpp:34:9: warning: unused variable ‘r’ [-Wunused-variable]
int r = 0,
^
user.cpp:69:1: error: expected ‘}’ at end of input
}
^
user.cpp:69:1: warning: no return statement in function returning non-void [-Wreturn-type]
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !