#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 | #63479774 | Utilizator | |
| Fișier | gradexi.cpp | Dimensiune | 814 B |
| Data încărcării | 05 Martie 2026, 09:22 | Scor/rezultat | Eroare de compilare |
gradexi.cpp: In function 'void grade(int (*)[101], int, nodGrad)': gradexi.cpp:12:6: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') Y[i].nod=i; ^ gradexi.cpp:13:6: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') Y[i].grad=0; ^ gradexi.cpp:15:6: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') Y[i].grad+=X[i][j]; ^ gradexi.cpp:15:21: error: 'j' was not declared in this scope Y[i].grad+=X[i][j]; ^ gradexi.cpp:19:9: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') if(Y[i].grad>Y[j].grad) ^ gradexi.cpp:19:19: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') if(Y[i].grad>Y[j].grad) ^ gradexi.cpp:20:11: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') swap(Y[i],Y[j]); ^ gradexi.cpp:20:16: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') swap(Y[i],Y[j]); ^ gradexi.cpp:21:10: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') else if(Y[i].grad=Y[j].grad && Y[i].nod>Y[j].nod) ^ gradexi.cpp:21:20: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') else if(Y[i].grad=Y[j].grad && Y[i].nod>Y[j].nod) ^ gradexi.cpp:21:33: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') else if(Y[i].grad=Y[j].grad && Y[i].nod>Y[j].nod) ^ gradexi.cpp:21:42: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') else if(Y[i].grad=Y[j].grad && Y[i].nod>Y[j].nod) ^ gradexi.cpp:22:11: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') swap(Y[i],Y[j]); ^ gradexi.cpp:22:16: error: no match for 'operator[]' (operand types are 'nodGrad' and 'int') swap(Y[i],Y[j]); ^ gradexi.cpp: In function 'int main()': gradexi.cpp:44:12: error: could not convert '(nodGrad*)(& D)' from 'nodGrad*' to 'nodGrad' grade(G,n,D); ^
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ă.