#417
Se dă lista muchiilor unui graf neorientat. Să se afișeze vârfurile de grad maxim.
Problema | GradMax | Operații I/O |
![]() gradmax.in /gradmax.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58077183 | Utilizator | |
Fișier | gradmax.cpp | Dimensiune | 580 B |
Data încărcării | 13 Mai 2025, 01:48 | Scor / rezultat | Eroare de compilare |
gradmax.cpp:7:28: error: conflicting declaration 'int g [105]' int i,j,n,a[105][105],g[105]; ^ gradmax.cpp:6:10: error: 'g' has a previous declaration as 'std::ofstream g' ofstream g("gradmax.out"); ^ gradmax.cpp: In function 'int main()': gradmax.cpp:19:10: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int') g[i]=0; ^ gradmax.cpp:22:18: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int') g[i]++; ^ gradmax.cpp:26:13: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int') if(g[i]>gmax) ^ gradmax.cpp:27:13: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int') g[i]++; ^ gradmax.cpp:31:13: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int') if(g[i]==gmax) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GradMax 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ă.