#412
Se dă lista muchiilor unui graf neorientat. Să se afișeze matricea de adiacență a grafului.
Problema | Adiacenta | Operații I/O |
![]() adiacenta.in /adiacenta.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58377513 | Utilizator | |
Fișier | adiacenta.cpp | Dimensiune | 459 B |
Data încărcării | 30 Mai 2025, 10:31 | Scor / rezultat | Eroare de compilare |
adiacenta.cpp:1:10: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix] #include <>iostream> ^ adiacenta.cpp:1:12: warning: extra tokens at end of #include directive [enabled by default] #include <>iostream> ^ adiacenta.cpp:1:10: error: empty filename in #include #include <>iostream> ^ adiacenta.cpp:3:1: error: 'ifstream' does not name a type ifstream cin("adiacenta1.in"); ^ adiacenta.cpp:4:1: error: 'ofstream' does not name a type ofstream cout("adiacenta1.out"); ^ adiacenta.cpp: In function 'int main()': adiacenta.cpp:8:11: error: 'cin' was not declared in this scope while(cin >> p >> r) ^ adiacenta.cpp:12:28: error: 'max' was not declared in this scope n = max(n, max(p, r)); ^ adiacenta.cpp:12:29: error: 'max' was not declared in this scope n = max(n, max(p, r)); ^ adiacenta.cpp:12:29: error: redeclaration of '<typeprefixerror>max' adiacenta.cpp:12:28: note: previous declaration '<typeprefixerror>max' n = max(n, max(p, r)); ^ adiacenta.cpp:17:17: error: 'cout' was not declared in this scope cout << a[i][j] << " "; ^ adiacenta.cpp:18:13: error: 'cout' was not declared in this scope cout << endl; ^ adiacenta.cpp:18:21: error: 'endl' was not declared in this scope cout << endl; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Adiacenta 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ă.