#430
Se dă lista muchiilor unui graf neorientat. Să se afișeze vârfurile izolate ale grafului.
| Problema | Izolate | Operații I/O |
izolate.in/izolate.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #59496516 | Utilizator | |
| Fișier | izolate.cpp | Dimensiune | 594 B |
| Data încărcării | 01 Octombrie 2025, 11:42 | Scor/rezultat | Eroare de compilare |
izolate.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream fout("izolate.out") ^ izolate.cpp: In function 'void citire_muchii()': izolate.cpp:10:10: error: 'n' was not declared in this scope fin>>n; ^ izolate.cpp:13:9: error: 'a' was not declared in this scope a[x][y]=1; ^ izolate.cpp: In function 'int grad(int)': izolate.cpp:20:10: warning: statement has no effect [-Wunused-value] for(j==1;j<=n;j++) ^ izolate.cpp:20:17: error: 'n' was not declared in this scope for(j==1;j<=n;j++) ^ izolate.cpp:21:12: error: 'a' was not declared in this scope if(a[x][j]==1) g++; ^ izolate.cpp:19:11: warning: unused variable 'i' [-Wunused-variable] int g,i,j; ^ izolate.cpp: In function 'int main()': izolate.cpp:28:16: error: 'n' was not declared in this scope for(i=1;i<=n;i++) ^ izolate.cpp:31:9: error: 'fout' was not declared in this scope fout<<nr<<" "; ^ izolate.cpp:32:16: error: 'n' was not declared in this scope for(i=1;i<=n;i++) ^ izolate.cpp:26:11: warning: unused variable 'j' [-Wunused-variable] int i,j,nr=0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Izolate 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ă.