#4957
Se dă un graf neorientat cu n vârfuri și m muchii. Să se afișeze vârfurile grafului dat în ordine crescătoare a gradelor. Vârfurile cu același grad se afișează în ordine crescătoare a valorii lor.
| Problema | GradeXI | Operații I/O |
gradexi.in/gradexi.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64445295 | Utilizator | |
| Fișier | gradexi.cpp | Dimensiune | 729 B |
| Data încărcării | 07 Mai 2026, 11:08 | Scor/rezultat | Eroare de compilare |
gradexi.cpp: In function ‘int main()’: gradexi.cpp:23:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 23 | for(int j=0;j<=n;j++) | ^~~ gradexi.cpp:25:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 25 | v[i].nod=i; | ^ gradexi.cpp:37:5: error: expected primary-expression before ‘for’ 37 | for(int i=1;i<=n;i++) | ^~~ gradexi.cpp:36:8: error: expected ‘)’ before ‘for’ 36 | if( | ~^ | ) 37 | for(int i=1;i<=n;i++) | ~~~ gradexi.cpp:36:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 36 | if( | ^~ gradexi.cpp:37:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 37 | for(int i=1;i<=n;i++) | ^ gradexi.cpp:37:17: error: ‘i’ was not declared in this scope
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GradeXI 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ă.