#3423
ctcmax
Se dă un graf orientat cu n
vârfuri și m
arce prin lista arcelor. Afișați componentele tare conexe formate din număr maxim de vârfuri.
Problema | ctcmax | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49425824 | Utilizator | |
Fișier | ctcmax.cpp | Dimensiune | 1.35 KB |
Data încărcării | 29 Februarie 2024, 22:18 | Scor / rezultat | Eroare de compilare |
ctcmax.cpp: In function 'int main()': ctcmax.cpp:50:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (Sol[nrc].size()>maxim) ^ ctcmax.cpp:60:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (i.size()==maxim) ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from ctcmax.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of '_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >; _Tp = std::vector<int>; _Compare = main()::__lambda0]': /usr/include/c++/4.8/bits/stl_algo.h:2296:78: required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >; _Compare = main()::__lambda0]' /usr/include/c++/4.8/bits/stl_algo.h:2337:62: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >; _Size = int; _Compare = main()::__lambda0]' /usr/include/c++/4.8/bits/stl_algo.h:5499:44: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >; _Compare = main()::__lambda0]' ctcmax.cpp:58:6: required from here /usr/include/c++/4.8/bits/stl_algo.h:2263:35: error: no match for call to '(main()::__lambda0) (std::vector<int>&, const std::vector<int>&)' while (__comp(*__first, __pivot)) ^ ctcmax.cpp:56:35: note: candidates are: sort(Sol.begin(), Sol.end(), [](vector<int>& a, vector<int>& b) { ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from ctcmax.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:2263:35: note: bool (*)(std::vector<int>&, std::vector<int>&) <conversion> while (__comp(*__first, __pivot)) ^ /usr/include/c++/4.8/bits/stl_algo.h:2263:35: note: candidate expects 3 arguments, 3 provided ctcmax.cpp:56:67: note: main()::__lambda0 sort(Sol.begin(), Sol.end(), [](vector<int>& a, vector<int>& b) { ^ ctcmax.cpp:56:67: note: no known conversion for argument 2 from 'const std::vector<int>' to 'std::vector<int>&' In file included from /usr/include/c++/4.8/algorithm:62:0, from ctcmax.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:2266:34: error: no match for call to '(main()::__lambda0) (const std::vector<int>&, std::vector<int>&)' while (__comp(__pivot, *__last)) ^ ctcmax.cpp:56:35: note: candidates are: sort(Sol.begin(), Sol.end(), [](vector<int>& a, vector<int>& b) { ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from ctcmax.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:2266:34: note: bool (*)(std::vector<int>&, std::vector<int>&) <conversion> while (__comp(__pivot, *__last)) ^ /usr/include/c++/4.8/bits/stl_algo.h:2266:34: note: candidate expects 3 arguments, 3 provided ctcmax.cpp:56:67: note: main()::__lambda0 sort(Sol.begin(), Sol.end(), [](vector<int>& a, vector<int>& b) { ^ ctcmax.cpp:56:67: note: no known conversion for argument 1 from 'const std::vector<int>' to 'std::vector<int>&'
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ctcmax face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.