Borderou de evaluare (job #3173452)
Utilizator | Data | 22 noiembrie 2023 21:38:07 | |
---|---|---|---|
Problema | Apm2 | Status | done |
Runda | Arhiva Monthly | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int Find(int)':
main.cpp:63:26: error: expected ')' before ';' token
63 | while (parent[x] != x; ) {
| ~ ^
| )
main.cpp:63:5: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
63 | while (parent[x] != x; ) {
| ^~~~~
main.cpp:63:28: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
63 | while (parent[x] != x; ) {
| ^
main.cpp:63:28: error: expected primary-expression before ')' token
main.cpp:58:9: warning: unused variable 'y' [-Wunused-variable]
58 | int y, R = x;
| ^
main.cpp: In function 'void Union(int, int)':
main.cpp:73:10: error: reference to 'rank' is ambiguous
73 | if ( rank[x] > rank[y] ) parent[y] = x;
| ^~~~
In file included from /usr/include/c++/12.2.1/bits/move.h:57,
from /usr/include/c++/12.2.1/bits/exception_ptr.h:43,
from /usr/include/c++/12.2.1/exception:168,
from /usr/include/c++/12.2.1/ios:39,
from /usr/include/c++/12.2.1/ostream:38,
from /usr/include/c++/12.2.1/iostream:39,
from main.cpp:1:
/usr/include/c++/12.2.1/type_traits:1394:12: note: candidates are: 'template<class> struct std::rank'
1394 | struct rank
| ^~~~
main.cpp:32:5: note: 'int rank [10005]'
32 | int rank[MAX_NODES], parent[MAX_NODES];
| ^~~~
main.cpp:73:20: error: reference to 'rank' is ambiguous
73 | if ( rank[x] > rank[y] ) parent[y] = x;
| ^~~~
/usr/include/c++/12.2.1/type_traits:1394:12: note: candidates are: 'template<class> struct std::rank'
1394 | struct rank
| ^~~~
main.cpp:32:5: note: 'int rank [10005]'
32 | int rank[MAX_NODES], parent[MAX_NODES];
| ^~~~
main.cpp:76:10: error: reference to 'rank' is ambiguous
76 | if ( rank[x] == rank[y] ) rank[y]++;
| ^~~~
/usr/include/c++/12.2.1/type_traits:1394:12: note: candidates are: 'template<class> struct std::rank'
1394 | struct rank
| ^~~~
main.cpp:32:5: note: 'int rank [10005]'
32 | int rank[MAX_NODES], parent[MAX_NODES];
| ^~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !