#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 | #64939480 | Utilizator | |
| Fișier | grade2.cpp | Dimensiune | 858 B |
| Data încărcării | 18 Iunie 2026, 09:15 | Scor/rezultat | Eroare de compilare |
grade2.cpp: In function ‘bool gradeegale(int)’: grade2.cpp:23:7: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 23 | for(int i=1; i<=n; ++i) | ^~~ grade2.cpp:25:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 25 | return (s1==s2); | ^~~~~~ grade2.cpp: In function ‘void gradele()’: grade2.cpp:31:7: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 31 | for(int i=1; i<=n; ++i) | ^~~ grade2.cpp:34:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 34 | cout<<c<<endl; | ^~~~ grade2.cpp:39:11: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 39 | int main() | ^~ grade2.cpp:39:11: note: remove parentheses to default-initialize a variable 39 | int main() | ^~ | -- grade2.cpp:39:11: note: or replace parentheses with braces to value-initialize a variable grade2.cpp:40:3: error: a function-definition is not allowed here before ‘{’ token 40 | { | ^ grade2.cpp:46:4: error: expected ‘}’ at end of input 46 | } | ^ grade2.cpp:28:3: note: to match this ‘{’ 28 | { | ^
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ă.