#437
Conex
Se dă lista muchiilor unui graf neorientat. Să se verifice dacă graful este sau nu conex.
Problema | Conex | Operații I/O |
conex.in /conex.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #36213523 | Utilizator | |
Fișier | conex.cpp | Dimensiune | 909 B |
Data încărcării | 10 Aprilie 2022, 13:44 | Scor / rezultat | Eroare de compilare |
conex.cpp:6:14: warning: missing terminating " character [enabled by default] ofstream out("cnx.out); ^ conex.cpp:6:1: error: missing terminating " character ofstream out("cnx.out); ^ conex.cpp:7:7: error: 'x' has not been declared int n,x,y,a[101][101]; ^ conex.cpp:7:9: error: 'y' has not been declared int n,x,y,a[101][101]; ^ conex.cpp:7:11: error: 'a' has not been declared int n,x,y,a[101][101]; ^ conex.cpp:7:22: error: expected ')' before ';' token int n,x,y,a[101][101]; ^ conex.cpp: In function 'void citire()': conex.cpp:11:9: error: 'n' was not declared in this scope in>>n; ^ conex.cpp:12:15: error: 'x' was not declared in this scope while(in>>x>>y) ^ conex.cpp:12:18: error: 'y' was not declared in this scope while(in>>x>>y) ^ conex.cpp:14:9: error: 'a' was not declared in this scope a[x][y]=a[y][x]=1; ^ conex.cpp: In function 'void afisare()': conex.cpp:19:20: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ conex.cpp:22:19: error: 'a' was not declared in this scope cout<<a[i][j]<<" "; ^ conex.cpp: In function 'bool conex()': conex.cpp:35:28: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ conex.cpp:37:20: error: 'a' was not declared in this scope if(a[x][i]==1&&viz[i]==0) ^ conex.cpp:46:12: error: 'n' was not declared in this scope if(ps==n)out<<"DA"<<endl; ^ conex.cpp:46:19: error: invalid operands of types 'std::ofstream(int, int, int, int (*)[101]) {aka std::basic_ofstream<char>(int, int, int, int (*)[101])}' and 'const char [3]' to binary 'operator<<' if(ps==n)out<<"DA"<<endl; ^ conex.cpp:47:15: error: invalid operands of types 'std::ofstream(int, int, int, int (*)[101]) {aka std::basic_ofstream<char>(int, int, int, int (*)[101])}' and 'const char [3]' to binary 'operator<<' else out<<"NU"<<endl; ^ conex.cpp:48:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Conex 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ă.