#573
Se dă lista arcelor unui graf orientat. Să se determine nodurile care au gradul exterior egal cu gradul interior.
| Problema | Grade2 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64572751 | Utilizator | |
| Fișier | grade2.cpp | Dimensiune | 698 B |
| Data încărcării | 15 Mai 2026, 09:14 | Scor/rezultat | Eroare de compilare |
grade2.cpp: In function ‘void citire()’: grade2.cpp:12:16: warning: statement has no effect [-Wunused-value] 12 | a[x][y]==1; | ~~~~~~~^~~ grade2.cpp: At global scope: grade2.cpp:16:1: error: expected unqualified-id before ‘{’ token 16 | { | ^ grade2.cpp: In function ‘int grad_int(int)’: grade2.cpp:26:14: warning: right operand of comma operator has no effect [-Wunused-value] 26 | for(i=1,i<=n;i++) | ~^~~ grade2.cpp:26:21: error: expected ‘;’ before ‘)’ token 26 | for(i=1,i<=n;i++) | ^ | ; grade2.cpp:26:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 26 | for(i=1,i<=n;i++) | ^~~ grade2.cpp:29:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 29 | return gr; | ^~~~~~ grade2.cpp: In function ‘int main()’: grade2.cpp:33:14: error: expected ‘;’ before ‘nr’ 33 | citire () | ^ | ; 34 | nr=0; | ~~ grade2.cpp:35:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 35 | for(i=1;i<=n;i++) | ^~~ grade2.cpp:38:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 38 | cout<<n<<'\n'; | ^~~~ grade2.cpp:39:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 39 | for(i=1;i<=n;i++) | ^~~ grade2.cpp:42:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 42 | return 0; | ^~~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Grade2 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ă.