#1111
Olimpia D’Info a găsit o placă gravată ce conţine mai multe cuvinte scrise cu semne grafice necunoscute, fiecare cuvânt fiind format din exact 5 semne grafice. Studiind cu atenție cuvintele, a dedus că în scrierea acestora sunt utilizate 12 semne grafice distincte şi a asociat câte o literă mică din alfabetul englez fiecărui semn. După asociere, a stabilit pentru fiecare semn o complexitate, scriind literele în ordinea crescătoare a complexităților pe care le-a stabilit anterior. Olimpia consideră că această ”complexitate” este cel mai potrivit criteriu de ordonare lexicografică.
Cunoscând ordinea semnelor și cuvintele de pe placă determinaţi:
a) Numărul de cuvinte distincte existente pe placă.
b) Şirul de cuvinte ordonat lexicografic, conform criteriului formulat de Olimpia.
| Problema | Zimeria | Operații I/O |
zimeria.in/zimeria.out
|
|---|---|---|---|
| Limita timp | 0.2 secunde | Limita memorie |
Total: 4 MB
/
Stivă 2 MB
|
| Id soluție | #64603818 | Utilizator | |
| Fișier | zimeria.cpp | Dimensiune | 18.06 KB |
| Data încărcării | 18 Mai 2026, 10:39 | Scor/rezultat | 0 puncte |
zimeria.cpp: In member function ‘std::vector<double> Point::Dist(Point, std::vector<Point>)’: zimeria.cpp:39:37: warning: comparison of integer expressions of different signedness: ‘long long int’ and ‘std::vector<Point>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 39 | for(long long i=0; i<T.size(); i++) rez[i]=A.Dist(T[i]); | ~^~~~~~~~~ zimeria.cpp: In function ‘std::string upper(std::string)’: zimeria.cpp:136:19: warning: unused variable ‘i’ [-Wunused-variable] 136 | long long i=0; | ^ zimeria.cpp: In function ‘void Check()’: zimeria.cpp:171:19: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 171 | for(auto& [key, l]:Lines) l.check(); | ^ zimeria.cpp:172:19: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 172 | for(auto& [key, p]:Polygons) p.check(); | ^ zimeria.cpp: In function ‘int main()’: zimeria.cpp:373:64: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 373 | for(auto const [key, point]: Points){ | ^ zimeria.cpp:373:64: warning: loop variable ‘<structured bindings>’ creates a copy from type ‘const std::pair<const std::__cxx11::basic_string<char>, Point>’ [-Wrange-loop-construct] 373 | for(auto const [key, point]: Points){ | ^~~~~~~~~~~~ zimeria.cpp:373:64: note: use reference type to prevent copying 373 | for(auto const [key, point]: Points){ | ^~~~~~~~~~~~ | & zimeria.cpp:446:57: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 446 | for(auto const& [name, pt]: Points){ | ^ zimeria.cpp:457:57: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 457 | for(auto const& [name, li]: Lines){ | ^ zimeria.cpp:469:56: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 469 | for(auto const [key, Poly]:Polygons){ | ^ zimeria.cpp:469:56: warning: loop variable ‘<structured bindings>’ creates a copy from type ‘const std::pair<const std::__cxx11::basic_string<char>, Polygon>’ [-Wrange-loop-construct] 469 | for(auto const [key, Poly]:Polygons){ | ^~~~~~~~~~~ zimeria.cpp:469:56: note: use reference type to prevent copying 469 | for(auto const [key, Poly]:Polygons){ | ^~~~~~~~~~~ | & zimeria.cpp: In function ‘std::string GetUniqueName()’: zimeria.cpp:155:1: warning: control reaches end of non-void function [-Wreturn-type] 155 | } | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 2 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 6 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 7 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 8 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 9 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 10 | 0.002 secunde | Raspuns gresit. | 5 | 0 | ||
| 11 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 12 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 13 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 14 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 15 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 16 | 0.002 secunde | Raspuns gresit. | 5 | 0 | ||
| 17 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 18 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 19 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| 20 | 0.001 secunde | Raspuns gresit. | 5 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Zimeria 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ă.