I finally got AC. :D. It works with my formula for the number of steps, thought I wrote it wrong in the previous post. It is in fact lcm( S/gcd(S,dx), S/gcd(S,dy)).
Thanks! Seeing the Waterloo test data really helped.
for Eduard: I guess that you are talking about Waterloo's test data. Maybe here ...
Search found 6 matches
- Tue Feb 10, 2004 2:42 am
- Forum: Volume 106 (10600-10699)
- Topic: 10620 - A Flea on a Chessboard
- Replies: 10
- Views: 7813
- Tue Feb 10, 2004 2:13 am
- Forum: Other words
- Topic: disappeared topic
- Replies: 2
- Views: 1265
disappeared topic
My problem is that I created a topic (asking help for a problem in volume CVI) and it has disappeared. In fact following the link in my emails (received when a new post is put) I can view it. But after I log in I can't find it back.
And I don't understand why this happened.
Sorry if it is not here ...
And I don't understand why this happened.
Sorry if it is not here ...
- Sun Feb 08, 2004 9:25 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10620 - A Flea on a Chessboard
- Replies: 10
- Views: 7813
The number of steps is the period of the sequence of squares, that is the lcm of the periods on x and y, that is per := lcm( gcd(S,dx), gcd(S,dy)). So after per moves the sequence will be the same, so there is no need to check further. In fact if after per moves we are on a white square then the ...
- Sun Feb 08, 2004 3:10 am
- Forum: Volume 106 (10600-10699)
- Topic: 10620 - A Flea on a Chessboard
- Replies: 10
- Views: 7813
10620 - A Flea on a Chessboard
I get WA for this problem and I don't know why.
My approach is the follwing:
I move the flea step by step, and I check each time whether it is on a black square (including the border) or on a white square. If for a number of steps (depending on S, dx and dy) l don't encounter a white squre then it ...
My approach is the follwing:
I move the flea step by step, and I check each time whether it is on a black square (including the border) or on a white square. If for a number of steps (depending on S, dx and dy) l don't encounter a white squre then it ...
- Mon May 26, 2003 2:09 am
- Forum: Volume 7 (700-799)
- Topic: 760 - DNA Sequencing
- Replies: 33
- Views: 16528
- Wed Sep 25, 2002 6:34 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10365 - Blocks
- Replies: 7
- Views: 5220
10365 - Blocks
I don't understand the output / the problem:
-for 5 there is no answer
-for 10 we can find a box of 2*2*3 inches and so the area is 2*(2*2+2*3+2*3)=32<34
- 26 blocks fit in the solid that contains 27 blocks (area[26]<area[27]) but 82>54.
It seems I don't understand what a solid rectangular means or ...
-for 5 there is no answer
-for 10 we can find a box of 2*2*3 inches and so the area is 2*(2*2+2*3+2*3)=32<34
- 26 blocks fit in the solid that contains 27 blocks (area[26]<area[27]) but 82>54.
It seems I don't understand what a solid rectangular means or ...