#575
Cunoscuti
Într-un grup sunt n
persoane, numerotate de la 1
la n
și o persoană poate cunoaște alte persoane – relație care nu este reciprocă. Să se determine persoana cea mai cunoscută.
Problema | Cunoscuti | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58016552 | Utilizator | |
Fișier | cunoscuti.cpp | Dimensiune | 3.60 KB |
Data încărcării | 08 Mai 2025, 14:21 | Scor / rezultat | Eroare de compilare |
cunoscuti.cpp:8:1: error: 'vector' does not name a type vector<int> G[nmax]; ^ cunoscuti.cpp: In function 'int bfs(int, int)': cunoscuti.cpp:18:3: error: 'queue' was not declared in this scope queue<int> q; ^ cunoscuti.cpp:18:9: error: expected primary-expression before 'int' queue<int> q; ^ cunoscuti.cpp:18:9: error: expected ';' before 'int' cunoscuti.cpp:19:3: error: 'q' was not declared in this scope q.push(start); ^ cunoscuti.cpp:25:18: error: 'G' was not declared in this scope for(int vec: G[t]) ^ cunoscuti.cpp: In function 'void drumuri_minim()': cunoscuti.cpp:41:5: error: 'fin' was not declared in this scope fin >> k; ^ cunoscuti.cpp:46:7: error: 'fout' was not declared in this scope fout << bfs(x, y) << '\n'; ^ cunoscuti.cpp: In function 'void citire()': cunoscuti.cpp:54:5: error: 'fin' was not declared in this scope fin >> n; ^ cunoscuti.cpp:62:7: error: 'G' was not declared in this scope G[x].push_back(y); ^ cunoscuti.cpp: In function 'int main()': cunoscuti.cpp:73:12: warning: the address of 'void exit(int)' will always evaluate as 'true' [-Waddress] while(!exit) ^ cunoscuti.cpp:94:29: error: 'introduc_muchie' was not declared in this scope introduc_muchie(); ^ cunoscuti.cpp:96:27: error: 'elimin_muchie' was not declared in this scope elimin_muchie(); ^ cunoscuti.cpp:98:23: error: 'print_bfs' was not declared in this scope print_bfs(); ^ cunoscuti.cpp:100:23: error: 'print_dfs' was not declared in this scope print_dfs(); ^ cunoscuti.cpp:104:29: error: 'tare_conexitate' was not declared in this scope tare_conexitate(); ^ cunoscuti.cpp:106:27: error: 'spanning_tree' was not declared in this scope spanning_tree(); ^ cunoscuti.cpp:108:22: error: 'max_dist' was not declared in this scope max_dist(); ^ cunoscuti.cpp:110:25: error: 'grade_egale' was not declared in this scope grade_egale(); ^ cunoscuti.cpp:112:22: error: 'max_grad' was not declared in this scope max_grad(); ^ cunoscuti.cpp:122:21: error: assignment of function 'void exit(int)' exit=1; ^ cunoscuti.cpp:122:21: error: cannot convert 'int' to 'void(int)throw ()' in assignment cunoscuti.cpp:72:10: warning: unused variable 'exist' [-Wunused-variable] bool exist=0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cunoscuti 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ă.