10961 - Chasing After Don Giovanni
Moderator: Board moderators
10961 - Chasing After Don Giovanni
could someone supply some I/O?
I'm crazying...
I'm crazying...
You may check out this thread.
I don't know whether the problem of the data is corrected before putting it into online judge.
I don't know whether the problem of the data is corrected before putting it into online judge.
-
- New poster
- Posts: 5
- Joined: Wed Nov 16, 2005 7:35 pm
- Location: Campinas - SP - Brazil
- Contact:
Code: Select all
7
2 3
5 2
3
5 4
3 4
3 6
4
4 3
4 5
5 5
5 6
2 2
4 2
3
6 2
6 3
3 3
3
2 4
5 4
5 6
0 2
0 0
1
0 2
1
0 0
2 2
4 4
1
2 4
1
2 4
2 2
4 4
2
2 4
2 2
1
2 4
2
2 4
2 2
1
2 4
2 2
4 4
1
2 4
2
2 4
4 4
2 2
4 4
2
2 4
2 8
2
2 5
2 8
Code: Select all
No
Yes
No
Yes
No
Yes
No
My accepted code returnslpereira wrote:Code: Select all
7 2 3 5 2 3 5 4 3 4 3 6 4 4 3 4 5 5 5 5 6 2 2 4 2 3 6 2 6 3 3 3 3 2 4 5 4 5 6 0 2 0 0 1 0 2 1 0 0 2 2 4 4 1 2 4 1 2 4 2 2 4 4 2 2 4 2 2 1 2 4 2 2 4 2 2 1 2 4 2 2 4 4 1 2 4 2 2 4 4 4 2 2 4 4 2 2 4 2 8 2 2 5 2 8
Output:
Code: Select all
No
Yes
No
Yes
No
No
Yes
Ami ekhono shopno dekhi...
HomePage
HomePage
The answer of the 6th case should be "Yes"Jan wrote:My accepted code returnslpereira wrote:Code: Select all
7 2 3 5 2 3 5 4 3 4 3 6 4 4 3 4 5 5 5 5 6 2 2 4 2 3 6 2 6 3 3 3 3 2 4 5 4 5 6 0 2 0 0 1 0 2 1 0 0 2 2 4 4 1 2 4 1 2 4 2 2 4 4 2 2 4 2 2 1 2 4 2 2 4 2 2 1 2 4 2 2 4 4 1 2 4 2 2 4 4 4 2 2 4 4 2 2 4 2 8 2 2 5 2 8
Output:Hope it helps.Code: Select all
No Yes No Yes No No Yes
Why?
So its not a safe route. And the answer is No.
Code: Select all
current location of Don Giovanni -> 2 2
current location of Leporello -> 4 4
1
2 4 -> location of Don Giovanni after the first move
2
2 4 -> location of Leporello after the first move
4 4
Ami ekhono shopno dekhi...
HomePage
HomePage
t=0: Leporello is at (4, 4), Don Giovanni is at (2, 2)Jan wrote:Why?
So its not a safe route. And the answer is No.Code: Select all
current location of Don Giovanni -> 2 2 current location of Leporello -> 4 4 1 2 4 -> location of Don Giovanni after the first move 2 2 4 -> location of Leporello after the first move 4 4
t=1: Leporello is at (3, 4), Don Giovanni is at (2, 3)
t=1: Leporello is at (2, 4), Don Giovanni is at (2, 4)
They meet. But (2, 4) is the destination.
a route is safe even if the villagers meet Leporello at the destination (because his mission is accomplished).
Actually the case given by lperairo has some error. here is the corrected input and the output for those:
Input:
Ouput:
Input:
Code: Select all
7
2 3
5 2
3
5 4
3 4
3 6
4
4 3
4 5
5 5
5 6
2 2
4 2
3
6 2
6 3
3 3
3
2 4
5 4
5 6
0 2
0 0
1
0 2
1
0 0
2 2
4 4
1
2 4
1
2 4
2 2
4 4
2
2 4
2 2
1
2 4
2 2
4 4
1
2 4
2
2 4
4 4
2 2
4 4
2
2 4
2 8
2
2 5
2 8
Code: Select all
No
Yes
No
Yes
No
Yes
No
Self judging is the best judging!
-
- Learning poster
- Posts: 69
- Joined: Mon Feb 09, 2015 1:56 am
Re: 10961 - Chasing After Don Giovanni
What is the output for this one?
I get "No"; but uDebug is coming up with "Yes"
It seems to me that they have to meet at ( 7, 7 ) at time 2
Code: Select all
1
7 9
9 7
1
5 7
1
7 3
It seems to me that they have to meet at ( 7, 7 ) at time 2