#4631
Se dă un graf orientat cu n vârfuri și m arce. Să se ordoneze cele n vârfuri crescător după gradul exterior. Vărfurile care au același grad exterior se vor ordona crescător după valoarea lor.
| Problema | OrdGrExt | Operații I/O |
ordgrext.in/ordgrext.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64561533 | Utilizator | |
| Fișier | ordgrext.cpp | Dimensiune | 2.33 KB |
| Data încărcării | 14 Mai 2026, 12:48 | Scor/rezultat | Eroare de compilare |
ordgrext.cpp: In function ‘int main()’: ordgrext.cpp:46:1: error: a function-definition is not allowed here before ‘{’ token 46 | { | ^ ordgrext.cpp:53:1: error: a function-definition is not allowed here before ‘{’ token 53 | { | ^ ordgrext.cpp:59:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 59 | int main() | ^~ ordgrext.cpp:59:9: note: remove parentheses to default-initialize a variable 59 | int main() | ^~ | -- ordgrext.cpp:59:9: note: or replace parentheses with braces to value-initialize a variable ordgrext.cpp:60:1: error: a function-definition is not allowed here before ‘{’ token 60 | { int x,y,k1; | ^ ordgrext.cpp:108:22: error: redeclaration of ‘int aux’ 108 | int aux=w[i]; | ^~~ ordgrext.cpp:104:18: note: ‘int aux’ previously declared here 104 | int aux=v[i]; | ^~~ ordgrext.cpp:44:5: warning: unused variable ‘n’ [-Wunused-variable] 44 | int n,m,a[101][101]; | ^ ordgrext.cpp:44:7: warning: unused variable ‘m’ [-Wunused-variable] 44 | int n,m,a[101][101]; | ^ ordgrext.cpp:44:9: warning: unused variable ‘a’ [-Wunused-variable] 44 | int n,m,a[101][101]; | ^ ordgrext.cpp:118:22: error: redeclaration of ‘int aux’ 118 | int aux=w[i]; | ^~~ ordgrext.cpp:114:13: note: ‘int aux’ previously declared here 114 | int aux=v[i]; | ^~~ ordgrext.cpp:22:12: warning: unused variable ‘k1’ [-Wunused-variable] 22 | { int x,y,k1; | ^~ ordgrext.cpp:29:9: warning: unused variable ‘k’ [-Wunused-variable] 29 | int k=0; | ^ ordgrext.cpp:34:7: warning: unused variable ‘maxi’ [-Wunused-variable] 34 | int maxi=-1; | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema OrdGrExt 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ă.