#4068
GradeK
Se dă lista muchiilor unui graf neorientat și un nod k
. Să se determine nodurile din graf care au gradul egal cu gradul nodului k
.
Problema | GradeK | Operații I/O |
gradek.in /gradek.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50373036 | Utilizator | |
Fișier | gradek.cpp | Dimensiune | 407 B |
Data încărcării | 06 Aprilie 2024, 22:13 | Scor / rezultat | Eroare de compilare |
gradek.cpp:6:10: error: conflicting declaration 'int f [101]' int f[101]; ^ gradek.cpp:4:10: error: 'f' has a previous declaration as 'std::ifstream f' ifstream f("gradek.in"); ^ gradek.cpp: In function 'int main()': gradek.cpp:11:18: error: expected ')' before ';' token while(f>>i>>j;) ^ gradek.cpp:11:19: error: expected primary-expression before ')' token while(f>>i>>j;) ^ gradek.cpp:11:19: error: expected ';' before ')' token gradek.cpp:17:13: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[k]==f[i]) ^ gradek.cpp:17:19: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[k]==f[i]) ^ gradek.cpp:21:13: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[k]==f[i]) ^ gradek.cpp:21:19: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[k]==f[i]) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GradeK 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ă.