#859
Rime
Se dă o mulțime cu n
cuvinte distincte. Să se împartă în submulțimi de cuvinte cu proprietatea că oricare două cuvinte din aceeași submulțime rimează și oricare două cuvinte care rimează sunt în aceeași submulțime.
Problema | Rime | Operații I/O |
rime.in /rime.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #29320660 | Utilizator | |
Fișier | rime.cpp | Dimensiune | 1.94 KB |
Data încărcării | 17 Aprilie 2021, 16:50 | Scor / rezultat | Eroare de compilare |
rime.cpp: In function 'int main()': rime.cpp:10:5: error: reference to 'cin' is ambiguous cin >> n; ^ rime.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("rime.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from rime.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ rime.cpp:13:9: error: reference to 'cin' is ambiguous cin >> m[i]; ^ rime.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("rime.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from rime.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ rime.cpp:65:5: error: reference to 'cout' is ambiguous cout << cnt << '\n'; ^ rime.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("rime.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from rime.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ rime.cpp:70:13: error: reference to 'cout' is ambiguous cout << m[i] << ' '; ^ rime.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("rime.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from rime.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ rime.cpp:73:21: error: reference to 'cout' is ambiguous cout << m[j] << ' ' , suf[j][0]='0'; ^ rime.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("rime.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from rime.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ rime.cpp:74:13: error: reference to 'cout' is ambiguous cout << endl; ^ rime.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("rime.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from rime.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 Rime 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ă.