Borderou de evaluare (job #2918735)
Utilizator | Data | 12 august 2022 18:38:57 | |
---|---|---|---|
Problema | Connect the Tree | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:9:66: error: 'int random [250005]' redeclared as different kind of entity
9 | int le[L], ri[L], aib[L], treelin[L], pos_in_treelin[L], random[L], j = 1;
| ^
In file included from /usr/include/c++/10/bits/std_abs.h:38,
from /usr/include/c++/10/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from main.cpp:1:
/usr/include/stdlib.h:401:17: note: previous declaration 'long int random()'
401 | extern long int random (void) __THROW;
| ^~~~~~
main.cpp: In function 'int main()':
main.cpp:45:13: warning: pointer to a function used in arithmetic [-Wpointer-arith]
45 | random[i] = rand();
| ^
main.cpp:45:15: error: assignment of read-only location '*(random + ((sizetype)i))'
45 | random[i] = rand();
| ~~~~~~~~~~^~~~~~~~
main.cpp:76:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
76 | update(y, random[y]);
| ^
main.cpp:76:27: error: invalid conversion from 'long int (*)() throw ()' {aka 'long int (*)()'} to 'int' [-fpermissive]
76 | update(y, random[y]);
| ~~~~~~~~^
| |
| long int (*)() throw () {aka long int (*)()}
main.cpp:23:33: note: initializing argument 2 of 'void update(int, int)'
23 | inline void update(int pos, int val){
| ~~~~^~~
main.cpp:78:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
78 | update(y, -random[y]);
| ^
main.cpp:78:28: error: wrong type argument to unary minus
78 | update(y, -random[y]);
| ~~~~~~~~^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !