#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 | #55072808 | Utilizator | |
Fișier | gradek.cpp | Dimensiune | 251 B |
Data încărcării | 20 Decembrie 2024, 15:38 | Scor / rezultat | Eroare de compilare |
gradek.cpp: In function 'int main()': gradek.cpp:3:5: error: 'f' was not declared in this scope f>>n>>k; ^ gradek.cpp:3:8: error: 'n' was not declared in this scope f>>n>>k; ^ gradek.cpp:3:11: error: 'k' was not declared in this scope f>>n>>k; ^ gradek.cpp:4:14: error: 'x' was not declared in this scope while(f>>x>>y) ^ gradek.cpp:4:17: error: 'y' was not declared in this scope while(f>>x>>y) ^ gradek.cpp:5:9: error: 'a' was not declared in this scope a[x][y]=a[y][x]=1; ^ gradek.cpp:6:22: error: 'grad' was not declared in this scope int gr=grad(k); ^ gradek.cpp:8:21: error: 'cnt' was not declared in this scope if(grad(i)==gr) cnt++; ^ gradek.cpp:9:5: error: 'g' was not declared in this scope g<<cnt<<endl; ^ gradek.cpp:9:8: error: 'cnt' was not declared in this scope g<<cnt<<endl; ^ gradek.cpp:9:13: error: 'endl' was not declared in this scope g<<cnt<<endl; ^
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ă.