#417
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 | #64750407 | Utilizator | |
| Fișier | gradmax.cpp | Dimensiune | 870 B |
| Data încărcării | 27 Mai 2026, 18:11 | Scor/rezultat | Eroare de compilare |
gradmax.cpp: In function ‘int main()’: gradmax.cpp:35:21: warning: comparison of integer expressions of different signedness: ‘std::set<int>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 35 | if(p.size() == M) k++; | ~~~~~~~~~^~~~ gradmax.cpp:41:21: warning: comparison of integer expressions of different signedness: ‘std::set<int>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 41 | if(p.size() == M){ | ~~~~~~~~~^~~~ gradmax.cpp:42:17: error: ‘auot’ was not declared in this scope; did you mean ‘auto’? 42 | for(auot &q : p){ | ^~~~ | auto gradmax.cpp:42:25: error: found ‘:’ in nested-name-specifier, expected ‘::’ 42 | for(auot &q : p){ | ^ | :: gradmax.cpp:42:23: error: ‘q’ has not been declared 42 | for(auot &q : p){ | ^ gradmax.cpp:45:9: error: expected primary-expression before ‘}’ token 45 | } | ^ gradmax.cpp:44:14: error: expected ‘;’ before ‘}’ token 44 | } | ^ | ; 45 | } | ~ gradmax.cpp:45:9: error: expected primary-expression before ‘}’ token 45 | } | ^ gradmax.cpp:44:14: error: expected ‘)’ before ‘}’ token 44 | } | ^ | ) 45 | } | ~ gradmax.cpp:42:16: note: to match this ‘(’ 42 | for(auot &q : p){ | ^ gradmax.cpp:45:9: error: expected primary-expression before ‘}’ token 45 | } | ^
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ă.