#4957
Se dă un graf neorientat cu n vârfuri și m muchii. Să se afișeze vârfurile grafului dat în ordine crescătoare a gradelor. Vârfurile cu același grad se afișează în ordine crescătoare a valorii lor.
| Problema | GradeXI | Operații I/O |
gradexi.in/gradexi.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64994684 | Utilizator | |
| Fișier | gradexi.cpp | Dimensiune | 714 B |
| Data încărcării | 08 Iulie 2026, 09:58 | Scor/rezultat | Eroare de compilare |
gradexi.cpp: In function ‘int main()’: gradexi.cpp:21:20: error: invalid types ‘int[int]’ for array subscript 21 | if(gr[n[i]]>gr[n[j]] || (gr[n[i]]==gr[n[j]]) || gr[n[i]]<gr[n[j]] && n[i]>n[j]) | ^ gradexi.cpp:21:29: error: invalid types ‘int[int]’ for array subscript 21 | if(gr[n[i]]>gr[n[j]] || (gr[n[i]]==gr[n[j]]) || gr[n[i]]<gr[n[j]] && n[i]>n[j]) | ^ gradexi.cpp:21:42: error: invalid types ‘int[int]’ for array subscript 21 | if(gr[n[i]]>gr[n[j]] || (gr[n[i]]==gr[n[j]]) || gr[n[i]]<gr[n[j]] && n[i]>n[j]) | ^ gradexi.cpp:21:52: error: invalid types ‘int[int]’ for array subscript 21 | if(gr[n[i]]>gr[n[j]] || (gr[n[i]]==gr[n[j]]) || gr[n[i]]<gr[n[j]] && n[i]>n[j]) | ^ gradexi.cpp:21:65: error: invalid types ‘int[int]’ for array subscript 21 | if(gr[n[i]]>gr[n[j]] || (gr[n[i]]==gr[n[j]]) || gr[n[i]]<gr[n[j]] && n[i]>n[j]) | ^ gradexi.cpp:21:74: error: invalid types ‘int[int]’ for array subscript 21 | if(gr[n[i]]>gr[n[j]] || (gr[n[i]]==gr[n[j]]) || gr[n[i]]<gr[n[j]] && n[i]>n[j]) | ^ gradexi.cpp:21:83: error: invalid types ‘int[int]’ for array subscript 21 | if(gr[n[i]]>gr[n[j]] || (gr[n[i]]==gr[n[j]]) || gr[n[i]]<gr[n[j]] && n[i]>n[j]) | ^ gradexi.cpp:21:88: error: invalid types ‘int[int]’ for array subscript 21 | if(gr[n[i]]>gr[n[j]] || (gr[n[i]]==gr[n[j]]) || gr[n[i]]<gr[n[j]] && n[i]>n[j]) | ^ gradexi.cpp:23:22: error: invalid types ‘int[int]’ for array subscript 23 | int aux=n[i]; | ^ gradexi.cpp:24:18: error: invalid types ‘int[int]’ for array subscript 24 | n[i]=n[j]; | ^ gradexi.cpp:24:23: error: invalid types ‘int[int]’ for array subscript 24 | n[i]=n[j]; | ^ gradexi.cpp:25:18: error: invalid types ‘int[int]’ for array subscript 25 | n[j]=aux; | ^ gradexi.cpp:30:13: error: invalid types ‘int[int]’ for array subscript 30 | g<<n[i]<<" "; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GradeXI 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ă.