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

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.
> 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.
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?
>  What is wrong?
1 4
2 4
1 4
Thank you! My program Accepted. It is my e-mail: oa1990_10_17@mail.ru
Кто нибудь на си++ может эту задачу скинуть на мыло... очень надо... Jonzah@list.ru заранее благодарю.
если кто-нибудь скинет ,скинь мне прошу)))rtu456@rambler.ru