Borderou de evaluare (job #3267294)
Utilizator | Data | 11 ianuarie 2025 10:46:29 | |
---|---|---|---|
Problema | Lowest Common Ancestor | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In member function 'void UandF::init(int)':
main.cpp:19:13: error: 'card' was not declared in this scope
19 | card.resize(n+1);
| ^~~~
main.cpp:20:13: error: 't' was not declared in this scope
20 | t.resize(n+1);
| ^
main.cpp: In member function 'int UandF::gasire(int)':
main.cpp:29:16: error: 't' was not declared in this scope
29 | if(t[nod]==nod) return nod;
| ^
main.cpp:30:20: error: 't' was not declared in this scope
30 | return t[nod]=gasire(t[nod]);
| ^
main.cpp: In member function 'void UandF::unire(int, int)':
main.cpp:37:16: error: 'card' was not declared in this scope
37 | if(card[nod2]>card[nod1]) swap(nod1 , nod2);
| ^~~~
main.cpp:38:13: error: 't' was not declared in this scope
38 | t[nod2]=nod1;
| ^
main.cpp:39:13: error: 'card' was not declared in this scope
39 | card[nod1]+=card[nod2];
| ^~~~
main.cpp: At global scope:
main.cpp:41:2: error: 'UandF link' redeclared as different kind of entity
41 | }link;
| ^~~~
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 main()':
main.cpp:59:17: error: request for member 'gasire' in 'link', which is of non-class type 'int(const char*, const char*) noexcept'
59 | if(link.gasire(edge[i].a)!=link.gasire(edge[i].b))
| ^~~~~~
main.cpp:59:41: error: request for member 'gasire' in 'link', which is of non-class type 'int(const char*, const char*) noexcept'
59 | if(link.gasire(edge[i].a)!=link.gasire(edge[i].b))
| ^~~~~~
main.cpp:61:18: error: request for member 'unire' in 'link', which is of non-class type 'int(const char*, const char*) noexcept'
61 | link.unire(edge[i].a , edge[i].b);
| ^~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !