#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 | #53760456 | Utilizator | |
Fișier | adiacenta.cpp | Dimensiune | 333 B |
Data încărcării | 11 Noiembrie 2024, 09:29 | Scor / rezultat | Eroare de compilare |
adiacenta.cpp:4:1: error: expected ',' or ';' before 'ofstream' ofstream g("adiacenta.out") ^ adiacenta.cpp: In function 'int main()': adiacenta.cpp:7:13: error: 'x' was not declared in this scope { while(f>>x>>y) ^ adiacenta.cpp:7:16: error: 'y' was not declared in this scope { while(f>>x>>y) ^ adiacenta.cpp:8:4: error: 'a' was not declared in this scope { a[x][y]=a[y][x]=1; ^ adiacenta.cpp:9:7: error: 'n' was not declared in this scope if(n<x) n=x; ^ adiacenta.cpp:10:7: error: 'n' was not declared in this scope if(n<y) n=y; ^ adiacenta.cpp:12:17: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ adiacenta.cpp:13:26: error: 'g' was not declared in this scope { for(int j=i;j<=n;j++) g<<a[i][j]<<' '; ^ adiacenta.cpp:13:29: error: 'a' was not declared in this scope { for(int j=i;j<=n;j++) g<<a[i][j]<<' '; ^ adiacenta.cpp:14:3: error: 'g' was not declared in this scope g<<'\n'; ^ adiacenta.cpp:16:2: error: 'g' was not declared in this scope g.close(); f.close(); ^
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ă.