Borderou de evaluare (job #2950792)
Utilizator | Data | 4 decembrie 2022 18:00:05 | |
---|---|---|---|
Problema | Connect the Tree | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:44:20: error: 'int random [250001]' redeclared as different kind of entity
44 | int random[1 + VMAX];
| ^
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:68:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
68 | random[node] = rand ();
| ^
main.cpp:68:20: error: assignment of read-only location '*(random + ((sizetype)node))'
68 | random[node] = rand ();
| ~~~~~~~~~~~~~^~~~~~~~~
main.cpp:77:39: warning: pointer to a function used in arithmetic [-Wpointer-arith]
77 | trick.update (pos[u], random[u]);
| ^
main.cpp:77:39: error: invalid conversion from 'long int (*)() throw ()' {aka 'long int (*)()'} to 'int' [-fpermissive]
77 | trick.update (pos[u], random[u]);
| ~~~~~~~~^
| |
| long int (*)() throw () {aka long int (*)()}
main.cpp:32:31: note: initializing argument 2 of 'void FenwickTree::update(int, int)'
32 | void update (int pos, int value) {
| ~~~~^~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !