Borderou de evaluare (job #3037936)
Utilizator | Data | 26 martie 2023 18:04:38 | |
---|---|---|---|
Problema | Radiatie | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:15:23: error: 'int link [15001]' redeclared as different kind of entity
15 | int n, m, k, link[NMAX], sz[NMAX], up[NMAX][LOG], upmin[NMAX][LOG], depth[NMAX];
| ^
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 find(int)':
main.cpp:18:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]
18 | while (x!=link[x]) x=link[x];
| ^
main.cpp:18:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
18 | while (x!=link[x]) x=link[x];
| ~^~~~~~~~~
main.cpp:18:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
18 | while (x!=link[x]) x=link[x];
| ^
main.cpp:18:32: error: invalid conversion from 'int (*)(const char*, const char*) noexcept' to 'int' [-fpermissive]
18 | while (x!=link[x]) x=link[x];
| ~~~~~~^
| |
| int (*)(const char*, const char*) noexcept
main.cpp: In function 'void unite(int, int)':
main.cpp:27:11: warning: pointer to a function used in arithmetic [-Wpointer-arith]
27 | link[b]=a;
| ^
main.cpp:27:12: error: assignment of read-only location '*(link + ((sizetype)b))'
27 | link[b]=a;
| ~~~~~~~^~
main.cpp: In function 'int main()':
main.cpp:80:15: warning: pointer to a function used in arithmetic [-Wpointer-arith]
80 | link[i]=i;
| ^
main.cpp:80:16: error: assignment of read-only location '*(link + ((sizetype)i))'
80 | link[i]=i;
| ~~~~~~~^~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !