#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 | #64569642 | Utilizator | |
| Fișier | grade2.cpp | Dimensiune | 696 B |
| Data încărcării | 14 Mai 2026, 20:49 | Scor/rezultat | Eroare de compilare |
grade2.cpp: In function ‘void citire()’: grade2.cpp:11:16: warning: statement has no effect [-Wunused-value] 11 | a[x][y]==1; | ~~~~~~~^~~ grade2.cpp: In function ‘int grad_ext(int)’: grade2.cpp:17:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 17 | for(j=1;j<=n;j++) | ^~~ grade2.cpp:20:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 20 | return gr; | ^~~~~~ grade2.cpp: In function ‘int grad_int(int)’: grade2.cpp:25:14: warning: right operand of comma operator has no effect [-Wunused-value] 25 | for(i=1,i<=n;i++) | ~^~~ grade2.cpp:25:21: error: expected ‘;’ before ‘)’ token 25 | for(i=1,i<=n;i++) | ^ | ; grade2.cpp:25:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 25 | for(i=1,i<=n;i++) | ^~~ grade2.cpp:28:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 28 | return gr; | ^~~~~~ grade2.cpp: In function ‘int main()’: grade2.cpp:34:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 34 | for(i=1;i<=n;i++) | ^~~ grade2.cpp:37:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 37 | cout<<n<<'\n'; | ^~~~ grade2.cpp:38:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 38 | for(i=1;i<=n;i++) | ^~~ grade2.cpp:41:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 41 | 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ă.