#4153
Se dă lista arcelor unui graf orientat. Să se determine nodurile care au gradul exterior mai mic decât gradul interior.
| Problema | Grade3 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64572968 | Utilizator | |
| Fișier | grade3.cpp | Dimensiune | 587 B |
| Data încărcării | 15 Mai 2026, 09:22 | Scor/rezultat | Eroare de compilare |
grade3.cpp: In function ‘int gr_ext(int)’: grade3.cpp:7:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 7 | for( i=1; i<=n; i++) | ^~~ grade3.cpp:10:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 10 | return gr; | ^~~~~~ grade3.cpp: In function ‘int gr_int(int)’: grade3.cpp:14:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 14 | for( i=1; i<=n; i++) | ^~~ grade3.cpp:17:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 17 | return gr; | ^~~~~~ grade3.cpp: In function ‘int main()’: grade3.cpp:31:21: warning: suggest parentheses around comparison in operand of ‘==’ [-Wparentheses] 31 | if(gr_ext(i)< gr_int(i)==0) | ~~~~~~~~~^~~~~~~~~~~ grade3.cpp:29:9: warning: unused variable ‘nrv’ [-Wunused-variable] 29 | int nrv = 0; | ^~~ grade3.cpp: At global scope: grade3.cpp:35:5: error: expected unqualified-id before ‘return’ 35 | return 0; | ^~~~~~ grade3.cpp:36:1: error: expected declaration before ‘}’ token 36 | } | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Grade3 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ă.