Borderou de evaluare (job #3233638)
Utilizator | Data | 4 iunie 2024 11:06:01 | |
---|---|---|---|
Problema | Arbore partial de cost minim | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:13:13: error: 'int link [200004]' redeclared as different kind of entity
13 | int link[lim];
| ^
In file included from /usr/include/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/c++/12.2.1/csignal:42,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:43,
from main.cpp:1:
/usr/include/unistd.h:819:12: note: previous declaration 'int link(const char*, const char*)'
819 | extern int link (const char *__from, const char *__to)
| ^~~~
main.cpp: In function 'int tata(int)':
main.cpp:21:24: warning: pointer to a function used in arithmetic [-Wpointer-arith]
21 | while(x!=link[x]) x = link[x];
| ^
main.cpp:21:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
21 | while(x!=link[x]) x = link[x];
| ~^~~~~~~~~
main.cpp:21:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
21 | while(x!=link[x]) x = link[x];
| ^
main.cpp:21:37: error: invalid conversion from 'int (*)(const char*, const char*) noexcept' to 'int' [-fpermissive]
21 | while(x!=link[x]) x = link[x];
| ~~~~~~^
| |
| int (*)(const char*, const char*) noexcept
main.cpp:22:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
22 | while(aux!=link[aux]) cpy = aux, aux = link[aux], link[cpy] = x;
| ^
main.cpp:22:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
22 | while(aux!=link[aux]) cpy = aux, aux = link[aux], link[cpy] = x;
| ~~~^~~~~~~~~~~
main.cpp:22:56: warning: pointer to a function used in arithmetic [-Wpointer-arith]
22 | while(aux!=link[aux]) cpy = aux, aux = link[aux], link[cpy] = x;
| ^
main.cpp:22:56: error: invalid conversion from 'int (*)(const char*, const char*) noexcept' to 'int' [-fpermissive]
22 | while(aux!=link[aux]) cpy = aux, aux = link[aux], link[cpy] = x;
| ~~~~~~~~^
| |
| int (*)(const char*, const char*) noexcept
main.cpp:22:67: warning: pointer to a function used in arithmetic [-Wpointer-arith]
22 | while(aux!=link[aux]) cpy = aux, aux = link[aux], link[cpy] = x;
| ^
main.cpp:22:69: error: assignment of read-only location '*(link + ((sizetype)cpy))'
22 | while(aux!=link[aux]) cpy = aux, aux = link[aux], link[cpy] = x;
| ~~~~~~~~~~^~~
main.cpp: In function 'bool join(int, int)':
main.cpp:34:15: warning: pointer to a function used in arithmetic [-Wpointer-arith]
34 | link[y] = x;
| ^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !