10171 - Meeting Prof. Miguel...
Moderator: Board moderators
-
- New poster
- Posts: 21
- Joined: Sun Jan 19, 2003 4:01 pm
- Location: Hong Kong
Hi Dominik...
Have you consider when your or prof. city has no connection with the others cities?
Try these inputs:
And my AC solution outputs:
Try them.
Good Luck!
angga888
Have you consider when your or prof. city has no connection with the others cities?

Try these inputs:
Code: Select all
2
Y U A B 0
M U A B 0
A C
2
Y U A B 0
M U A B 0
C C
Code: Select all
You will never meet.
0 C
Good Luck!
angga888

-
- Guru
- Posts: 834
- Joined: Wed May 29, 2002 4:11 pm
- Location: Wroclaw, Poland
- Contact:
Yes I consider such cases ... I also try using Floyd, but I got WA too ...
I guess that I have some IO problem , but I don;t know which is it .... all tests, which I found or which are sended to me my program solved correctly. This problem drive me crazy - looks easy but I have a lot problems with it
:(:(:(
Best regards
DM
I guess that I have some IO problem , but I don;t know which is it .... all tests, which I found or which are sended to me my program solved correctly. This problem drive me crazy - looks easy but I have a lot problems with it

Best regards
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
Born from ashes - restarting counter of problems (800+ solved problems)
-
- Guru
- Posts: 834
- Joined: Wed May 29, 2002 4:11 pm
- Location: Wroclaw, Poland
- Contact:
Finally I got it. I did small mistake -incorrect type of one variable. and accepted with this minor change
:)
Thank all very much for help and test cases
Best regards
DM

Thank all very much for help and test cases

Best regards
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
Born from ashes - restarting counter of problems (800+ solved problems)
CUT.......
Got Ac now.
I failed in this test case :
the answer is obvious so I wouldn't tell.
ciaoo...
Got Ac now.
I failed in this test case :
Code: Select all
4
Y U A B 3
M B B A 0
Y B C A 10
M U B D 1
A B
ciaoo...
WA-now i got accepted
I am getting WA, my program passed all the input given in this post, can someone provide me with a case where my program fails.
I think my code is ok,i checked every line.But there was nothing wrong.At least i did not find anything.Could anyone help me.
[cpp]
cut. As i got accepted.So i cut this.
[/cpp]
I think my code is ok,i checked every line.But there was nothing wrong.At least i did not find anything.Could anyone help me.
[cpp]
cut. As i got accepted.So i cut this.
[/cpp]
Last edited by Mahmud776 on Tue Dec 23, 2003 2:59 pm, edited 4 times in total.
-
- New poster
- Posts: 7
- Joined: Wed Dec 17, 2003 2:53 pm
- Location: Dhaka
- Contact:
Great help
Thanks Shamim,
Thanks for your helps, after some modifications according to your advices i got accepted. You are a great helper.
---Mahmud
Thanks for your helps, after some modifications according to your advices i got accepted. You are a great helper.
---Mahmud
i'm a bit confused about printing the lexographical order of possible places.
consider this test case:
2
Y B A B 2
M B B A 5
A B
Would the output should be:
2 B A
-> B is printed first because the minimum energy is 2, or:
2 A B
-> print the minimum energy, afterwards all the possible places in lexographical order.
i tried using floyd, with special modification to handle the self loops. for all the previous inputs in this thread, it handle correctly. but still got some minor problem i guess... and i dun have many time to think bout it coz i'd prefer to go out and play >_<
so please help me with anymore testcases...
consider this test case:
2
Y B A B 2
M B B A 5
A B
Would the output should be:
2 B A
-> B is printed first because the minimum energy is 2, or:
2 A B
-> print the minimum energy, afterwards all the possible places in lexographical order.
i tried using floyd, with special modification to handle the self loops. for all the previous inputs in this thread, it handle correctly. but still got some minor problem i guess... and i dun have many time to think bout it coz i'd prefer to go out and play >_<
so please help me with anymore testcases...
After many WAs i got AC finally.
I use floyed algorithm to compute all pair shortest distance (just for the simple code).
My program is ok for all the input above but the judge said WA. I generate a case and it's about many U or B roads connecting two cities.
BTW pay attention to the input
i use
[cpp]
scanf(" %c %c %c %c %d", &d1, &d2, &d3, &d4, &len);[/cpp]
good luck[/quote]
I use floyed algorithm to compute all pair shortest distance (just for the simple code).
My program is ok for all the input above but the judge said WA. I generate a case and it's about many U or B roads connecting two cities.
hope it will help for those who get WA.2
Y U A B 10
Y U A B 100
A B
0
BTW pay attention to the input
i use
[cpp]
scanf(" %c %c %c %c %d", &d1, &d2, &d3, &d4, &len);[/cpp]
good luck[/quote]
10171 - Meeting Prof. Miguel
i tested all the cases on this board..
it seems to be all right..
but i still get WA..
help plz.. ㅠㅠ
it seems to be all right..
but i still get WA..
help plz.. ㅠㅠ
Code: Select all
CUT AFTER AC
Last edited by helloneo on Fri Jun 08, 2007 6:34 am, edited 2 times in total.