#1346
PbInfo
C++
Dându-se un șir de caractere și mai multe cuvinte, să se afle dacă există cuvinte care apar în şir.
Problema | PbInfo | Operații I/O |
pbinfo.in /pbinfo.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53228162 | Utilizator | |
Fișier | pbinfo.cpp | Dimensiune | 397 B |
Data încărcării | 21 Octombrie 2024, 21:54 | Scor / rezultat | Eroare de compilare |
pbinfo.cpp:4:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("pbinfo.in"); ^ pbinfo.cpp:5:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("pbinfo.out"); ^ pbinfo.cpp: In function 'int main()': pbinfo.cpp:11:1: error: reference to 'cin' is ambiguous cin>>link; ^ pbinfo.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("pbinfo.in"); ^ In file included from pbinfo.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ pbinfo.cpp:12:1: error: reference to 'cin' is ambiguous cin>>n; ^ pbinfo.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("pbinfo.in"); ^ In file included from pbinfo.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ pbinfo.cpp:15:5: error: reference to 'cin' is ambiguous cin>>pswd; ^ pbinfo.cpp:4:10: note: candidates are: <typeprefixerror>cin ifstream cin("pbinfo.in"); ^ In file included from pbinfo.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ pbinfo.cpp:21:5: error: reference to 'cout' is ambiguous cout<<"DA"; ^ pbinfo.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("pbinfo.out"); ^ In file included from pbinfo.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ pbinfo.cpp:22:6: error: reference to 'cout' is ambiguous else cout<<"NU"; ^ pbinfo.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("pbinfo.out"); ^ In file included from pbinfo.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ pbinfo.cpp:23:6: error: reference to 'cout' is ambiguous else cout<<"DA"; ^ pbinfo.cpp:5:10: note: candidates are: <typeprefixerror>cout ofstream cout("pbinfo.out"); ^ In file included from pbinfo.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ pbinfo.cpp:9:11: warning: unused variable 'cnt' [-Wunused-variable] int n,cnt=-1,i,k=-1; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PbInfo 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ă.