#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 | #55039762 | Utilizator | |
Fișier | rime.cpp | Dimensiune | 1.95 KB |
Data încărcării | 17 Decembrie 2024, 21:18 | Scor / rezultat | Eroare de compilare |
rime.cpp: In function 'int main()': rime.cpp:14:5: error: reference to 'cin' is ambiguous cin >> n; ^ rime.cpp:5: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:17:9: error: reference to 'cin' is ambiguous cin >> m[i]; ^ rime.cpp:5: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:69:5: error: reference to 'cout' is ambiguous cout << cnt << '\n'; ^ rime.cpp:6: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 << m[i] << ' '; ^ rime.cpp:6: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:77:21: error: reference to 'cout' is ambiguous cout << m[j] << ' ' , suf[j][0]='0'; ^ rime.cpp:6: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:78:13: error: reference to 'cout' is ambiguous cout << endl; ^ rime.cpp:6: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ă.