#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 | #64884160 | Utilizator | |
| Fișier | grade2.cpp | Dimensiune | 352 B |
| Data încărcării | 09 Iunie 2026, 13:28 | Scor/rezultat | 0 puncte |
grade2.cpp: In function ‘int main()’: grade2.cpp:17:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 17 | for(i=1; i<=n; i++) | ^~~ grade2.cpp:19:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 19 | cout<<nr<<endl; | ^~~~ grade2.cpp:21:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 21 | for(i=1; i<=n; i++) | ^~~ grade2.cpp:24:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 24 | return 0; | ^~~~~~ grade2.cpp:22:12: warning: array subscript <unknown> is outside array bounds of ‘int [0]’ [-Warray-bounds=] 22 | if(ge[i]==gi[i]) cout<<i<<" "; | ~~~~^ grade2.cpp:3:5: note: while referencing ‘ge’ 3 | int ge[]={}, gi[]={}, m,n,i,j,nr; | ^~ grade2.cpp:22:19: warning: array subscript <unknown> is outside array bounds of ‘int [0]’ [-Warray-bounds=] 22 | if(ge[i]==gi[i]) cout<<i<<" "; | ~~~~^ grade2.cpp:3:14: note: while referencing ‘gi’ 3 | int ge[]={}, gi[]={}, m,n,i,j,nr; | ^~ grade2.cpp:18:12: warning: array subscript <unknown> is outside array bounds of ‘int [0]’ [-Warray-bounds=] 18 | if(ge[i]==gi[i]) nr++; | ~~~~^ grade2.cpp:3:5: note: while referencing ‘ge’ 3 | int ge[]={}, gi[]={}, m,n,i,j,nr; | ^~ grade2.cpp:18:19: warning: array subscript <unknown> is outside array bounds of ‘int [0]’ [-Warray-bounds=] 18 | if(ge[i]==gi[i]) nr++; | ~~~~^ grade2.cpp:3:14: note: while referencing ‘gi’ 3 | int ge[]={}, gi[]={}, m,n,i,j,nr; | ^~ grade2.cpp:12:9: warning: array subscript <unknown> is outside array bounds of ‘int [0]’ [-Warray-bounds=] 12 | ge[i]++; | ~~~~^ grade2.cpp:3:5: note: while referencing ‘ge’ 3 | int ge[]={}, gi[]={}, m,n,i,j,nr; | ^~ grade2.cpp:12:9: warning: array subscript <unknown> is outside array bounds of ‘int [0]’ [-Warray-bounds=] 12 | ge[i]++; | ~~~~^ grade2.cpp:3:5: note: while referencing ‘ge’ 3 | int ge[]={}, gi[]={}, m,n,i,j,nr; | ^~ grade2.cpp:13:9: warning: array subscript <unknown> is outside array bounds of ‘int [0]’ [-Warray-bounds=] 13 | gi[j]++; | ~~~~^ grade2.cpp:3:14: note: while referencing ‘gi’ 3 | int ge[]={}, gi[]={}, m,n,i,j,nr; | ^~ grade2.cpp:13:9: warning: array subscript <unknown> is outside array bounds of ‘int [0]’ [-Warray-bounds=] 13 | gi[j]++; | ~~~~^ grade2.cpp:3:14: note: while referencing ‘gi’ 3 | int ge[]={}, gi[]={}, m,n,i,j,nr; | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 40 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 40 | 0 | ||
| Punctaj total | 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ă.