825 - Walking on the Safe Side
Moderator: Board moderators
825 - Walking on the Safe Side
I have a question on this problem~
Does the *minimal path* in the problem description means (width+height-1) or an actual minimal path that reaches the goal from the starting position?
Thx
Does the *minimal path* in the problem description means (width+height-1) or an actual minimal path that reaches the goal from the starting position?
Thx
-
- New poster
- Posts: 27
- Joined: Thu Feb 14, 2002 2:00 am
Where can you find judge's input? Have u got the input for problem 827 - Buddy Memory Allocator, too?Picard wrote:i've solved it generaly (i still think the problem description allow longer minimal pathes), but now i checked the judge's input and found no minimal path longer as width+height-2
Thanks a lot!
About 825, and wrong answer
Hi!
I have just solved this task. But there is something wrong in the input.
I mean that there are some spaces after the numbers. For pascal users if they use eoln function it may cause many errors...
I wonder if this could be fixed..
Good Luck
I have just solved this task. But there is something wrong in the input.
I mean that there are some spaces after the numbers. For pascal users if they use eoln function it may cause many errors...
I wonder if this could be fixed..
Good Luck
Thanks for your note, cyfra. I've got an AC!!
However, I still don't understand what "minimal paths" mean in this qq........................
Also, my algorithm isn't very good. If the width and height are large, my program can't handle it......
(P.S. I made use of Floyd-Warshall's Algorithm...)
Any suggestions? Any help is warmly welcomed.
However, I still don't understand what "minimal paths" mean in this qq........................
Also, my algorithm isn't very good. If the width and height are large, my program can't handle it......
(P.S. I made use of Floyd-Warshall's Algorithm...)
Any suggestions? Any help is warmly welcomed.
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
The minimal paths mean the total steps is (W-1)+(N-1).Observer wrote: However, I still don't understand what "minimal paths" mean in this qq........................
Also, my algorithm isn't very good. If the width and height are large, my program can't handle it......
(P.S. I made use of Floyd-Warshall's Algorithm...)
Any suggestions? Any help is warmly welcomed.
And I just use easy DP to solve, because for the tatal different path of position p[j] = p[i-1][j] + p[j-1].
-
- Experienced poster
- Posts: 146
- Joined: Sat Apr 26, 2003 2:51 am
eloha wrote:The minimal paths mean the total steps is (W-1)+(N-1).Observer wrote: However, I still don't understand what "minimal paths" mean in this qq........................
Also, my algorithm isn't very good. If the width and height are large, my program can't handle it......
(P.S. I made use of Floyd-Warshall's Algorithm...)
Any suggestions? Any help is warmly welcomed.
And I just use easy DP to solve, because for the tatal different path of position p[j] = p[i-1][j] + p[j-1].
Ah yes! You're right!!
Thanks very much! :p
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
-
- Experienced poster
- Posts: 146
- Joined: Sat Apr 26, 2003 2:51 am
-
- New poster
- Posts: 39
- Joined: Fri Nov 14, 2003 11:18 pm
- Location: Riga, Latvia
- Contact:
Dima, hi.
I think I have an answer to your not a very recent question.Anyway, try rewriting your code from scratch. That usually helps.
I think I have an answer to your not a very recent question.
Nope.Dima wrote:Is it nessesary to use long arithmetic?
Here you are:Dima wrote:Can somebody post a few inputs and outputs?
Code: Select all
8
1 1
1
1 8
1
1 8
1 4
8 1
1
2
3
4
5
6
7
8
8 1
1
2
3
4 1
5
6
7
8
4 4
1
2
3
4
8 8
1
2
3 5
4 1 4
5 3 6
6 2 7
7 8
8
8 8
1
2 6
3 2
4 5
5 1
6 3
7 5 8
8 5
Code: Select all
1
1
0
1
0
20
0
233