#474
VerifLant
Se dă lista muchiilor unui graf neorientat cu n
vârfuri și o succesiune de k
vârfuri. Să se verifice dacă vârfurile din succesiune formează un lanț.
Problema | VerifLant | Operații I/O |
veriflant.in /veriflant.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53512087 | Utilizator | |
Fișier | veriflant.cpp | Dimensiune | 1008 B |
Data încărcării | 03 Noiembrie 2024, 20:04 | Scor / rezultat | Eroare de compilare |
veriflant.cpp: In function 'int main()': veriflant.cpp:31:5: error: reference to 'cin' is ambiguous cin >> n >> m; ^ veriflant.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("veriflant.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from veriflant.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ veriflant.cpp:34:9: error: reference to 'cin' is ambiguous cin >> x >> y; ^ veriflant.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("veriflant.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from veriflant.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ veriflant.cpp:39:5: error: reference to 'cin' is ambiguous cin >> k; ^ veriflant.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("veriflant.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from veriflant.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ veriflant.cpp:42:9: error: reference to 'cin' is ambiguous cin >> p; ^ veriflant.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("veriflant.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from veriflant.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ veriflant.cpp:44:13: error: reference to 'cin' is ambiguous cin >> L[j]; ^ veriflant.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("veriflant.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from veriflant.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ veriflant.cpp:46:31: error: reference to 'cout' is ambiguous if(verif(p , L) == 0) cout << "NU\n"; ^ veriflant.cpp:6:10: note: candidates are: std::ofstream cout ofstream cout("veriflant.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from veriflant.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ veriflant.cpp:47:36: error: reference to 'cout' is ambiguous else if(verif(p , L) == 1) cout << "ELEMENTAR\n"; ^ veriflant.cpp:6:10: note: candidates are: std::ofstream cout ofstream cout("veriflant.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from veriflant.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ veriflant.cpp:48:14: error: reference to 'cout' is ambiguous else cout << "NEELEMENTAR\n"; ^ veriflant.cpp:6:10: note: candidates are: std::ofstream cout ofstream cout("veriflant.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from veriflant.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema VerifLant 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ă.