#2262
scrabble
n
piese speciale de scrabble. Fiecare piesă are inscripționate două litere mari ale alfabetului englez A...Z
, una dintre litere fiind consoană, cealaltă fiind vocală. Jucătorul poate forma cuvinte prin alăturarea pieselor pe orizontală.
Un cuvânt este considerat valid dacă respectă următoarele condiții:
Cuvântul este cu atât mai valoros cu cât folosește mai multe piese de scrabble.
Problema | scrabble | Operații I/O |
scrabble.in /scrabble.out
|
---|---|---|---|
Limita timp | 0.7 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53198276 | Utilizator | |
Fișier | scrabble.cpp | Dimensiune | 1.07 KB |
Data încărcării | 21 Octombrie 2024, 09:29 | Scor / rezultat | Eroare de compilare |
scrabble.cpp: In function 'int main()': scrabble.cpp:22:5: error: reference to 'cin' is ambiguous cin >> n; ^ scrabble.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("scrabble.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from scrabble.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ scrabble.cpp:25:9: error: reference to 'cin' is ambiguous cin >> s; ^ scrabble.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin("scrabble.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from scrabble.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ scrabble.cpp:32:40: error: reference to 'cout' is ambiguous for(int i = 1 ; i <= nv ; i++) cout << v[i]; ^ scrabble.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("scrabble.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from scrabble.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ scrabble.cpp:34:40: error: reference to 'cout' is ambiguous for(int i = 1 ; i <= nc ; i++) cout << c[i]; ^ scrabble.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("scrabble.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from scrabble.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ scrabble.cpp:36:39: error: reference to 'cout' is ambiguous for(int i = 1 ; i <=nv ; i++) cout << v[i]; ^ scrabble.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("scrabble.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from scrabble.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ scrabble.cpp:38:40: error: reference to 'cout' is ambiguous for(int i = 1 ; i <= nc ; i++) cout << c[i]; ^ scrabble.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout("scrabble.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from scrabble.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 scrabble 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ă.