#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 | #15519270 | Utilizator | |
Fișier | adiacenta.cpp | Dimensiune | 563 B |
Data încărcării | 19 Aprilie 2019, 08:03 | Scor / rezultat | Eroare de compilare |
adiacenta.cpp:9:12: error: array bound is not an integer constant before ']' token int mat[n+1][n+1]; ^ adiacenta.cpp:9:17: error: array bound is not an integer constant before ']' token int mat[n+1][n+1]; ^ adiacenta.cpp: In function 'void initMat()': adiacenta.cpp:12:18: error: expected initializer before '<=' token for(int i=1,i<=n;i++) ^ adiacenta.cpp:12:18: error: expected ';' before '<=' token adiacenta.cpp:12:18: error: expected primary-expression before '<=' token adiacenta.cpp:14:12: error: 'mat' was not declared in this scope mat[i][j]=0; ^ adiacenta.cpp: In function 'void writeInMat(int, int)': adiacenta.cpp:18:6: error: 'mat' was not declared in this scope mat[x][y]=mat[y][x]=1; ^ adiacenta.cpp: In function 'void writeMat()': adiacenta.cpp:23:33: error: 'mat' was not declared in this scope for(int j=1;j<=n;j++)f<<mat[i][j]; ^ adiacenta.cpp: At global scope: adiacenta.cpp:27:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] main(){ ^
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ă.