#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 | #53997497 | Utilizator | |
Fișier | scrabble.cpp | Dimensiune | 1.05 KB |
Data încărcării | 17 Noiembrie 2024, 13:34 | Scor / rezultat | Eroare de compilare |
scrabble.cpp: In function 'int main()': scrabble.cpp:26:5: error: reference to 'cin' is ambiguous cin >> n; ^ scrabble.cpp:5: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:29:9: error: reference to 'cin' is ambiguous cin >> s; ^ scrabble.cpp:5: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:36:40: error: reference to 'cout' is ambiguous for(int i = 1 ; i <= nv ; i++) cout << v[i]; ^ scrabble.cpp:6: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:6: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:40:39: error: reference to 'cout' is ambiguous for(int i = 1 ; i <=nv ; i++) cout << v[i]; ^ scrabble.cpp:6: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:42:40: error: reference to 'cout' is ambiguous for(int i = 1 ; i <= nc ; i++) cout << c[i]; ^ scrabble.cpp:6: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ă.