1004 - Traversing Grid

Discussion around the problems of the COJ.
Forum rules
Remember that posting AC code is not allowed here. If you are going to ask a question or to post a solution, describe your algorithm instead. Posting AC code will be penalized.
Post Reply
User avatar
dovier
Posts: 1097
Joined: 7 years ago
Location: Havana, Cuba
Gender: Male
Cuba

1004 - Traversing Grid

Post by dovier » 6 years ago




Mindiell
Posts: 5
Joined: 6 years ago
Gender: None specified

Re: 1004 - Traversing Grid

Post by Mindiell » 6 years ago

Hi, I'm trying to resolve this problem. Everything is working fine on my computer, but I'm stuck on the first test, saying that there is a wrong answer.
I surely have a problem of output, but I can't see where...

Can I have access (MP for exemple) to the first test and it's answer ? Because I can't understand why there is a problem.
Thx

george
Posts: 43
Joined: 7 years ago
Gender: None specified

Re: 1004 - Traversing Grid

Post by george » 6 years ago

Mindiell wrote: Can I have access (MP for exemple) to the first test and it's answer ? Because I can't understand why there is a problem.
Thx
Mr Mindiell we do not publish the datasets of the problems , what you can do is to explain the algorithm you are using and surely someone will advice you or find the problem of your code.

hope you understand

Mindiell
Posts: 5
Joined: 6 years ago
Gender: None specified

Re: 1004 - Traversing Grid

Post by Mindiell » 6 years ago

Well, I understand, but when I try the example of the problem, it seems taht everything is fine.
I know that I can't post my code, I can post the output :

Code: Select all

me@my-laptop:~/path$ python 1004\ -\ Traversing\ Grid.py 
4
1 1
2 2
3 1
3 3
R
L
D
R
me@my-laptop:~/path$
And I did some other tests, by hand and with my program : everything is just fine...

User avatar
JJRZ
Posts: 13
Joined: 7 years ago
Location: UH
Gender: None specified

Re: 1004 - Traversing Grid

Post by JJRZ » 6 years ago

Mindiell wrote: I understand, but when I try the example of the problem, it seems taht everything is fine.
You should know that the examples are not enough, in fact, the key cases (cases that we generally forget) don't hardly ever appear in the example
george wrote: what you can do is to explain the algorithm you are using and surely someone will advice you or find the problem of your code.
Why don't you explain to us your algorithm?

This is my advice... Regards

Mindiell
Posts: 5
Joined: 6 years ago
Gender: None specified

Re: 1004 - Traversing Grid

Post by Mindiell » 6 years ago

One month later, I'm back :)

Well, I finally get it !
It was just a conversion problem because 20 is greater than 3 but not within strings ;)

Post Reply

Return to “Problem set”