ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1152. False Mirrors

TL
Posted by Arseniy 30 Apr 2016 23:29
My sulution a has n^2 * 2 ^ n and get TL
accepted solution supposed to be O(n * 2^n), right?
Re: TL
Posted by Jane Soboleva (SumNU) 1 May 2016 01:03
You can manage with a blunt force solution, but you have to make it at least slightly optimized. I got AC in 1.8s by recursively searching for available combos of 3, and if on another step there were none, i searched for positions to destroy at least one.
Re: TL
Posted by Stepan 24 Sep 2021 06:10
1000 1000 1000 50 50 1000 1000 1000 1 1 1 1000 1000 1000 50 50
in this case you need to shot combos of 2 (50 50) earlier then combos of 3 (1 1 1)  (when combos (1000 1000 1000) are shoted)