BFS with Priority Queue can fall in local loop.4 4
1 4 10
1 2 1
2 3 1
3 1 1
1 4 10000
Search found 4 matches
- Thu Oct 21, 2004 5:03 am
- Forum: Volume 107 (10700-10799)
- Topic: 10740 - Not the Best
- Replies: 23
- Views: 16881
^^
TLE...Test Case
- Tue Oct 19, 2004 10:23 am
- Forum: Volume 107 (10700-10799)
- Topic: 10740 - Not the Best
- Replies: 23
- Views: 16881
^^
I got WA, too.
My solution is BFS with Priority Queue. Is Right?
My solution is BFS with Priority Queue. Is Right?

- Fri Oct 01, 2004 2:32 am
- Forum: Volume 107 (10700-10799)
- Topic: 10728 - Help!
- Replies: 9
- Views: 4672
^^
Thank you.Eduard wrote:Hello sozu.
InputOutputCode: Select all
<a> <b> <a> <a>
2 same words.Code: Select all
1) abc abc 2) acc acc 3) aaa aaa 4) ppp ppp 5) g g ... ... ...
Each word containing only lower case letters.
I got a ACed.

- Wed Sep 29, 2004 3:25 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10728 - Help!
- Replies: 9
- Views: 4672
Hm..
What is a right?Input
<a> <b>
<a> <a>
Ouput
1) abc abc
2) -