#412
Adiacenta
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 | #34277004 | Utilizator | |
Fișier | adiacenta.cpp | Dimensiune | 649 B |
Data încărcării | 27 Ianuarie 2022, 14:52 | Scor / rezultat | Eroare de compilare |
adiacenta.cpp: In function 'int main()': adiacenta.cpp:10:43: error: 'n' was not declared in this scope cout << " numarul de noduri "; cin >> n; //citire graf ^ adiacenta.cpp:11:43: error: 'm' was not declared in this scope cout << " numarul de muchii "; cin >> m; ^ adiacenta.cpp:12:10: error: 'i' was not declared in this scope for( i = 0; i < n; ++i ) ^ adiacenta.cpp:14:14: error: 'j' was not declared in this scope for( j = 0; j < n; ++j ) ^ adiacenta.cpp:16:13: error: 'a' was not declared in this scope a[ i ][ j ] = 0; ^ adiacenta.cpp:20:10: error: 'i' was not declared in this scope for( i = 0; i < m; i++) //matricea de adiacenta ^ adiacenta.cpp:23:16: error: 'x' was not declared in this scope cin >> x >> y; ^ adiacenta.cpp:23:21: error: 'y' was not declared in this scope cin >> x >> y; ^ adiacenta.cpp:26:13: error: 'a' was not declared in this scope a[x][y] = 1; ^ adiacenta.cpp:7:9: warning: unused variable 'count' [-Wunused-variable] int count = 0; ^ adiacenta.cpp:8:10: warning: unused variable 'complet' [-Wunused-variable] bool complet = false; ^
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ă.