#430
Izolate
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 | #28100387 | Utilizator | |
Fișier | izolate.cpp | Dimensiune | 457 B |
Data încărcării | 22 Februarie 2021, 12:35 | Scor / rezultat | Eroare de compilare |
izolate.cpp:3:17: error: expected ')' before '.' token ifstream(izolate.in) ^ izolate.cpp:5:26: error: 'a' does not name a type int n, i, j, x, y, nr=0; a[101][101]; ^ izolate.cpp: In function 'int main()': izolate.cpp:7:2: error: 'fin' was not declared in this scope {fin>>n; ^ izolate.cpp:7:7: error: 'n' was not declared in this scope {fin>>n; ^ izolate.cpp:8:13: error: 'x' was not declared in this scope while(fin>>x>>y) //exista muchie de la x la y ^ izolate.cpp:8:16: error: 'y' was not declared in this scope while(fin>>x>>y) //exista muchie de la x la y ^ izolate.cpp:9:9: error: 'a' was not declared in this scope if(a[x][y]==0) //nu au adaugat deja muchia ^ izolate.cpp:14:6: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ izolate.cpp:15:9: error: 'a' was not declared in this scope if(a[i][0]==0) ^ izolate.cpp:16:6: error: 'nr' was not declared in this scope nr++; ^ izolate.cpp:17:2: error: 'fout' was not declared in this scope fout<<nr<<" "; ^ izolate.cpp:17:8: error: 'nr' was not declared in this scope fout<<nr<<" "; ^ izolate.cpp:18:6: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ izolate.cpp:19:9: error: 'a' was not declared in this scope if(a[i][0]==0; ^ izolate.cpp:19:19: error: expected ')' before ';' token if(a[i][0]==0; ^ izolate.cpp:20:15: error: 'i' was not declared in this scope fout<<i<<" "; ^
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ă.