#4835
Pentru avea succes la Olimpiada de Jocuri pe Internet (OJI), Vasilică a cumpărat de la Baba Yaga un talisman norocos. Talismanul norocos este un șir care îndeplineşte următoarele două condiţii:
7;1.1. determinaţi numărul minim de cifre care trebuie să fie eliminate din șirul V, astfel încât acesta să devină talisman norocos;
2. determinaţi talismanul norocos minim lexicografic, care se obţine eliminând din șirul V un număr minim de cifre.
ONI 2025, baraj juniori
| Problema | vnoroc | Operații I/O |
vnoroc.in/vnoroc.out
|
|---|---|---|---|
| Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63843829 | Utilizator | |
| Fișier | vnoroc.cpp | Dimensiune | 5.24 KB |
| Data încărcării | 21 Martie 2026, 16:56 | Scor/rezultat | Eroare de compilare |
vnoroc.cpp: In lambda function: vnoroc.cpp:29:16: error: 'gcd' is not a member of 'std' return std::gcd(a, b) > 1; ^ vnoroc.cpp: In function 'int main()': vnoroc.cpp:142:23: error: expected unqualified-id before '[' token for (auto [f, t, st] : states) { ^ vnoroc.cpp:142:23: error: expected ';' before '[' token vnoroc.cpp:142:24: error: 'f' was not declared in this scope for (auto [f, t, st] : states) { ^ vnoroc.cpp:142:27: error: 't' was not declared in this scope for (auto [f, t, st] : states) { ^ vnoroc.cpp:142:30: error: 'st' was not declared in this scope for (auto [f, t, st] : states) { ^ vnoroc.cpp: In lambda function: vnoroc.cpp:142:34: error: expected '{' before ':' token for (auto [f, t, st] : states) { ^ vnoroc.cpp: In function 'int main()': vnoroc.cpp:142:34: error: expected ';' before ':' token vnoroc.cpp:142:34: error: expected primary-expression before ':' token vnoroc.cpp:142:34: error: expected ')' before ':' token vnoroc.cpp:142:34: error: expected primary-expression before ':' token vnoroc.cpp:142:34: error: expected ';' before ':' token vnoroc.cpp:182:1: error: expected '}' at end of input } ^ vnoroc.cpp:140:17: warning: unused variable 'rk' [-Wunused-variable] int rk = 0; ^ vnoroc.cpp:141:17: warning: unused variable 'lastFirst' [-Wunused-variable] int lastFirst = -1, lastTail = -1; ^ vnoroc.cpp:141:33: warning: unused variable 'lastTail' [-Wunused-variable] int lastFirst = -1, lastTail = -1; ^ vnoroc.cpp:182:1: error: expected '}' at end of input } ^ vnoroc.cpp:182:1: error: expected '}' at end of input vnoroc.cpp: In lambda function: vnoroc.cpp:30:5: warning: control reaches end of non-void function [-Wreturn-type] }; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema vnoroc 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ă.