#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 | #35741468 | Utilizator | |
Fișier | conex.cpp | Dimensiune | 550 B |
Data încărcării | 21 Martie 2022, 12:53 | Scor / rezultat | Eroare de compilare |
conex.cpp:5:14: warning: character constant too long for its type [enabled by default] ifstream cin('conex.in') ^ conex.cpp:6:15: warning: character constant too long for its type [enabled by default] ofstream cout('conex.out') ^ conex.cpp:5:24: error: invalid conversion from 'int' to 'const char*' [-fpermissive] ifstream cin('conex.in') ^ In file included from conex.cpp:1:0: /usr/include/c++/4.8/fstream:467:7: error: initializing argument 1 of 'std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]' [-fpermissive] basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in) ^ conex.cpp:6:1: error: expected ',' or ';' before 'ofstream' ofstream cout('conex.out') ^ conex.cpp: In function 'void gagica(int)': conex.cpp:11:5: error: 'v' was not declared in this scope v[k]=1; ^ conex.cpp:12:21: error: 'n' was not declared in this scope for (int i=1;i<=n;i++) ^ conex.cpp:13:13: error: 'a' was not declared in this scope if (a[k][i]==1 &&v[i]==0) ^ conex.cpp: In function 'int main()': conex.cpp:20:10: error: 'n' was not declared in this scope cin>>n; ^ conex.cpp:23:20: error: 'a' was not declared in this scope cin >> a[i][j]; ^ conex.cpp:28:9: error: 'v' was not declared in this scope if (v[i]==1) ^ conex.cpp:29:9: error: 's' was not declared in this scope s++; ^ conex.cpp:31:8: error: 's' was not declared in this scope if (s == n) ^ conex.cpp:32:5: error: 'cout' was not declared in this scope cout<<"DA"; ^ conex.cpp:34:5: error: 'cout' was not declared in this scope cout<<"NU"; ^
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ă.