Borderou de evaluare (job #2935441)
Utilizator | Data | 6 noiembrie 2022 18:54:15 | |
---|---|---|---|
Problema | Paduri de multimi disjuncte | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int Union(int, int)':
main.cpp:29:2: warning: no return statement in function returning non-void [-Wreturn-type]
29 | }
| ^
main.cpp: In function 'void DFS(int, int)':
main.cpp:37:14: error: too few arguments to function 'void DFS(int, int)'
37 | DFS( *it);
| ^
main.cpp:30:14: note: declared here
30 | inline void DFS( int x, int father )
| ^~~
main.cpp: In function 'int main()':
main.cpp:53:18: error: too few arguments to function 'void DFS(int, int)'
53 | DFS(x);
| ^
main.cpp:30:14: note: declared here
30 | inline void DFS( int x, int father )
| ^~~
main.cpp:57:13: error: 'i' was not declared in this scope; did you mean 'in'?
57 | in>>i>>x>>y;
| ^
| in
main.cpp:60:13: error: 'cout' was not declared in this scope
60 | cout<<( find(x) == find(y) ? "DA\n" : "NU\n" );
| ^~~~
main.cpp:4:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
3 | #include <cstdlib>
+++ |+#include <iostream>
4 | #define MAX_N 100011
main.cpp:60:27: error: no matching function for call to 'find(int&)'
60 | cout<<( find(x) == find(y) ? "DA\n" : "NU\n" );
| ^
In file included from /usr/include/c++/10/bits/locale_facets.h:48,
from /usr/include/c++/10/bits/basic_ios.h:37,
from /usr/include/c++/10/ios:44,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/fstream:38,
from main.cpp:2:
/usr/include/c++/10/bits/streambuf_iterator.h:422:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(std::istreambuf_iterator<_CharT>, std::istreambuf_iterator<_CharT>, const _CharT2&)'
422 | find(istreambuf_iterator<_CharT> __first,
| ^~~~
/usr/include/c++/10/bits/streambuf_iterator.h:422:5: note: template argument deduction/substitution failed:
main.cpp:60:27: note: mismatched types 'std::istreambuf_iterator<_CharT>' and 'int'
60 | cout<<( find(x) == find(y) ? "DA\n" : "NU\n" );
| ^
main.cpp:60:38: error: no matching function for call to 'find(int&)'
60 | cout<<( find(x) == find(y) ? "DA\n" : "NU\n" );
| ^
In file included from /usr/include/c++/10/bits/locale_facets.h:48,
from /usr/include/c++/10/bits/basic_ios.h:37,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !