#413
Se dă lista muchiilor unui graf neorientat. Să se afișeze matricea de adiacență a grafului.
| Problema | Adiacenta1 | Operații I/O |
adiacenta1.in/adiacenta1.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63662549 | Utilizator | |
| Fișier | adiacenta1.cpp | Dimensiune | 548 B |
| Data încărcării | 13 Martie 2026, 09:44 | Scor/rezultat | Eroare de compilare |
adiacenta1.cpp:4:12: warning: missing terminating ' character [enabled by default] ofstream g('adiacenta1.out"); ^ adiacenta1.cpp:4:1: error: missing terminating ' character ofstream g('adiacenta1.out"); ^ adiacenta1.cpp:5:12: error: 'innt' was not declared in this scope innt x, y, n, i, j, a[101][101]; ^ adiacenta1.cpp:5:20: error: 'y' was not declared in this scope innt x, y, n, i, j, a[101][101]; ^ adiacenta1.cpp:5:23: error: 'n' was not declared in this scope innt x, y, n, i, j, a[101][101]; ^ adiacenta1.cpp:5:26: error: 'i' was not declared in this scope innt x, y, n, i, j, a[101][101]; ^ adiacenta1.cpp:5:29: error: 'j' was not declared in this scope innt x, y, n, i, j, a[101][101]; ^ adiacenta1.cpp:5:32: error: 'a' was not declared in this scope innt x, y, n, i, j, a[101][101]; ^ adiacenta1.cpp: In function 'int main()': adiacenta1.cpp:7:15: error: 'n' was not declared in this scope { n=0; ^ adiacenta1.cpp:8:23: error: 'x' was not declared in this scope while(f>>x>>y) ^ adiacenta1.cpp:8:26: error: 'y' was not declared in this scope while(f>>x>>y) ^ adiacenta1.cpp:10:13: error: 'a' was not declared in this scope a[x][y]=a[y][x]=1; ^ adiacenta1.cpp:16:5: error: 'i' was not declared in this scope for(i=1; i<=n; i++) ^ adiacenta1.cpp:17:6: error: 'j' was not declared in this scope {for(j=1; j<=n;j++) ^ adiacenta1.cpp:18:8: error: 'a' was not declared in this scope g<<a[i][j]<<' '; ^ adiacenta1.cpp:22:21: error: expected ';' before ':' token return 0:} ^ adiacenta1.cpp:22:21: error: expected primary-expression before ':' token adiacenta1.cpp:22:21: error: expected ';' before ':' token
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Adiacenta1 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ă.