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 1920. Titan Ruins: the Infinite Power of Magic

What is the answer if L is odd?
Posted by NUUZ_1 22 Oct 2012 13:31
I think if L is odd, answer: "Unsuitable device"
 otherwise we can get all cycles where L%2==0&&L<=n*n.
But I got WA#4. What is wrong?
(sorry for poor english.)
thank.
Re: What is the answer if L is odd?
Posted by Bogatyr 22 Oct 2012 21:49
> What is wrong?

Might just be a code mistake.  I had the exact right idea but two stupid bugs that got hit in WA#4 and WA#5.
Re: What is the answer if L is odd?
Posted by NUUZ_1 23 Oct 2012 00:12
There is some test cases:
For n=5 and L=24 I got
Overwhelming power of magic
1 1
2 1
3 1
4 1
5 1
5 2
5 3
5 4
5 5
4 5
4 4
4 3
4 2
3 2
3 3
3 4
3 5
2 5
1 5
1 4
2 4
1 4
1 3
1 2
for n=5 and L=22
Overwhelming power of magic
1 1
2 1
3 1
4 1
5 1
5 2
5 3
5 4
5 5
4 5
4 4
4 3
4 2
3 2
3 3
3 4
3 5
2 5
1 5
1 4
1 3
1 2
for n=5 and L=16
Overwhelming power of magic
1 1
2 1
3 1
4 1
4 2
4 3
4 4
3 4
3 3
3 2
2 2
2 3
2 4
1 4
1 3
1 2
for n=5 and L=4
Overwhelming power of magic
1 1
2 1
2 2
1 2
 What is wrong?
Re: What is the answer if L is odd?
Posted by Bogatyr 23 Oct 2012 00:27
>  What is wrong?
1 4
2 4
1 4
Re: What is the answer if L is odd?
Posted by NUUZ_1 23 Oct 2012 13:34
Thank you! My program Accepted. It is my e-mail: oa1990_10_17@mail.ru
Re: What is the answer if L is odd?
Posted by Zaharov_Jon 23 Oct 2012 19:25
Кто нибудь на си++ может эту задачу скинуть на мыло... очень надо... Jonzah@list.ru заранее благодарю.
Re: What is the answer if L is odd?
Posted by stalkerore 16 May 2013 04:18
если кто-нибудь скинет ,скинь мне прошу)))rtu456@rambler.ru