|
|
вернуться в форумI can't imagine how does this problem can be solved for 0.05c!!!!!!!!!!!!!!Can anybody explain me this thing????????????????????????Please Help me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! So simply.... 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... > 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... 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!!! > |
|
|