#3863
Dungeon Crawl: Paper Soup tocmai a devenit cel mai popular joc, iar tu eşti pe cale să îl încerci. Jocul se desfăşoară pe un teren dreptunghiular cu N linii și M coloane). La fiecare pas, jucătorul poate să se mişte pe direcțiile nord, sud, est sau vest. Dacă acesta ajunge pe o poziţie cu o monedă, colectează moneda, iar aceasta dispare de pe hartă. Dacă acesta ajunge pe o poziţie cu mină, sistemul de peşteri se prăbuşeste, jucătorul pierde toate monezile colectate până în acel moment, iar jocul se termină. Considerând că vei adopta cea mai bună strategie, care este numărul maxim de monezi pe care îl poţi obține garantat, indiferent de unde vei fi poziţionat la început?
| Problema | dungeons | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 1.8 secunde | Limita memorie |
Total: 256 MB
/
Stivă 8 MB
|
| Id soluție | #58688917 | Utilizator | |
| Fișier | dungeons.cpp | Dimensiune | 6.85 KB |
| Data încărcării | 17 Iulie 2025, 17:25 | Scor/rezultat | Eroare de compilare |
dungeons.cpp: In function 'int solve(std::vector<std::pair<int, int> >)': dungeons.cpp:159:26: error: expected unqualified-id before '[' token for (auto const& [vision, new_positions] : partitions) { ^ dungeons.cpp:159:26: error: expected ';' before '[' token dungeons.cpp:159:27: error: 'vision' was not declared in this scope for (auto const& [vision, new_positions] : partitions) { ^ dungeons.cpp:159:35: error: 'new_positions' was not declared in this scope for (auto const& [vision, new_positions] : partitions) { ^ dungeons.cpp: In lambda function: dungeons.cpp:159:50: error: expected '{' before ':' token for (auto const& [vision, new_positions] : partitions) { ^ dungeons.cpp: In function 'int solve(std::vector<std::pair<int, int> >)': dungeons.cpp:159:50: error: expected ';' before ':' token dungeons.cpp:159:50: error: expected primary-expression before ':' token dungeons.cpp:159:50: error: expected ')' before ':' token dungeons.cpp:159:50: error: expected primary-expression before ':' token dungeons.cpp:159:50: error: expected ';' before ':' token dungeons.cpp: In function 'int main()': dungeons.cpp:201:26: error: expected unqualified-id before '[' token for (auto const& [vision, positions] : initial_partitions) { ^ dungeons.cpp:201:26: error: expected ';' before '[' token dungeons.cpp:201:27: error: 'vision' was not declared in this scope for (auto const& [vision, positions] : initial_partitions) { ^ dungeons.cpp:201:35: error: 'positions' was not declared in this scope for (auto const& [vision, positions] : initial_partitions) { ^ dungeons.cpp: In lambda function: dungeons.cpp:201:46: error: expected '{' before ':' token for (auto const& [vision, positions] : initial_partitions) { ^ dungeons.cpp: In function 'int main()': dungeons.cpp:201:46: error: expected ';' before ':' token dungeons.cpp:201:46: error: expected primary-expression before ':' token dungeons.cpp:201:46: error: expected ')' before ':' token dungeons.cpp:201:46: error: expected primary-expression before ':' token dungeons.cpp:201:46: error: expected ';' before ':' token
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema dungeons 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ă.