#417
GradMax
Se dă lista muchiilor unui graf neorientat. Să se afișeze vârfurile de grad maxim.
Problema | GradMax | Operații I/O |
gradmax.in /gradmax.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51853873 | Utilizator | |
Fișier | gradmax.cpp | Dimensiune | 907 B |
Data încărcării | 29 August 2024, 19:49 | Scor / rezultat | Eroare de compilare |
gradmax.cpp: In function 'int main()': gradmax.cpp:40:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 1; i < ans.size(); ++i) { ^ gradmax.cpp:19:15: warning: unused variable 'k' [-Wunused-variable] int n, x, y, k; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from gradmax.cpp:4: /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::pair<int, int>*, std::vector<std::pair<int, int> > >; _Tp = std::pair<int, int>; _Compare = bool (*)(std::pair<int, int>&, std::pair<int, int>&)]': /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::pair<int, int>*, std::vector<std::pair<int, int> > >; _Compare = bool (*)(std::pair<int, int>&, std::pair<int, int>&)]' /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::pair<int, int>*, std::vector<std::pair<int, int> > >; _Size = int; _Compare = bool (*)(std::pair<int, int>&, std::pair<int, int>&)]' /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::pair<int, int>*, std::vector<std::pair<int, int> > >; _Compare = bool (*)(std::pair<int, int>&, std::pair<int, int>&)]' gradmax.cpp:36:34: required from here /usr/include/c++/4.8/bits/stl_algo.h:2263:35: error: invalid initialization of reference of type 'std::pair<int, int>&' from expression of type 'const std::pair<int, int>' while (__comp(*__first, __pivot)) ^ /usr/include/c++/4.8/bits/stl_algo.h:2266:34: error: invalid initialization of reference of type 'std::pair<int, int>&' from expression of type 'const std::pair<int, int>' while (__comp(__pivot, *__last)) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GradMax 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ă.