#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 | #64628558 | Utilizator | |
| Fișier | grade2.cpp | Dimensiune | 627 B |
| Data încărcării | 19 Mai 2026, 12:24 | Scor/rezultat | Eroare de compilare |
grade2.cpp: In function ‘int gradext(int)’: grade2.cpp:6:19: error: ‘n’ was not declared in this scope 6 | for (int j=1; j<=n; ++j) | ^ grade2.cpp:7:7: error: ‘a’ was not declared in this scope 7 | {if (a[x][j]==1) | ^ grade2.cpp: In function ‘int gradint(int)’: grade2.cpp:14:20: error: ‘n’ was not declared in this scope 14 | for (int i=1; i<=n; ++i) | ^ grade2.cpp:16:11: error: ‘a’ was not declared in this scope 16 | if (a[i][x]==1) | ^ grade2.cpp: In function ‘int main()’: grade2.cpp:23:9: error: ‘n’ was not declared in this scope; did you mean ‘yn’? 23 | cin >> n >> m; | ^ | yn grade2.cpp:23:14: error: ‘m’ was not declared in this scope; did you mean ‘tm’? 23 | cin >> n >> m; | ^ | tm grade2.cpp:30:5: error: ‘a’ was not declared in this scope 30 | a[x][y]=1; | ^ grade2.cpp:41:2: error: expected ‘}’ at end of input 41 | } | ^ grade2.cpp:33:1: note: to match this ‘{’ 33 | { | ^ grade2.cpp:41:2: error: expected ‘}’ at end of input 41 | } | ^ grade2.cpp:22:1: note: to match this ‘{’ 22 | { | ^
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ă.