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 1122. Game

I can't imagine how does this problem can be solved for 0.05c!!!!!!!!!!!!!!Can anybody explain me this thing????????????????????????Please Help me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Posted by Bedny Yuri (bedny@rain.ifmo.ru) 1 Mar 2002 23:41
So simply....
Posted by Algorist 2 Mar 2002 01:07
Hey, haven't you solved such probems? They are so popular...

Imagine the following
000
000
000

If i invert zeroes like this
010
111
010
for example, making the same turn (I mean inverting the same zeroes)
will lead to returing to
000
000
000
And you certainly gain nothing out of that. So, each turn should be
done only(or at most) once.
So, you just try all possibillities-> they are 2^16(for each sqaure
you have two possblities-> to perform the operation if it is a
centre, or not to perform. The squares are 16, so you have 2*2*2*...*2
(16 times) ) if I am not much mistaken(I've Accepted that problem
long time ago).

Good luck!
I think , it's the difference in optimization of inverting function. or more? i don't really know...
Posted by MadPsyentist/Sam 2 Mar 2002 06:25
> Hey, haven't you solved such probems? They are so popular...
>
> Imagine the following
> 000
> 000
> 000
>
> If i invert zeroes like this
> 010
> 111
> 010
> for example, making the same turn (I mean inverting the same zeroes)
> will lead to returing to
> 000
> 000
> 000
> And you certainly gain nothing out of that. So, each turn should be
> done only(or at most) once.
> So, you just try all possibillities-> they are 2^16(for each sqaure
> you have two possblities-> to perform the operation if it is a
> centre, or not to perform. The squares are 16, so you have
2*2*2*...*2
> (16 times) ) if I am not much mistaken(I've Accepted that problem
> long time ago).
>
> Good luck!
but now, i think it's not...
Posted by MadPsyentist/Sam 2 Mar 2002 06:37
look at the authors who solves this problem within 0.1s time. they also
use less than 100K memory!

"How could you do that!?"

I too, really interest in it.
i solved this prob. in just 0.03 !!! but Cleverkid did it in 0.02!!!
Posted by Locomotive 28 Jan 2003 03:06
>