first self made cp question for pclub secy test
There is tournament of pokemon to test whether ground pokemon are faster or fighting type pokemons. In the tournament, dugtrio is representing ground pokemon and lucario is representing fighting type pokemons. Both pokemons start at their initial position t
0
and b
0
.Dugtrio and Lucario take time T
1
and T
2
respectively. Lucario has to move on pillars, with top of pillar i
represented by b
i
. Dugtrio has to go through tunnels linked at some places, which each such place i
represented by t
i
. There are n
2
pillars and lucario has to reach to pillar n
2
-1
to win. The pillars between which Lucario can jump are p
i
and p
j
and number of such possible jumps are m
1
. There are n
1
interlinks between tunnels and dugtrio has to reach end of this tunnel maze which is at n
1
-1
. The tunnels are joined by a
i
and a
j
. You have to place your bet on one pokemon. On which pokemon will you place your bet to become richer?
values of b
i
and t
j
are i
and j
respectively and i
and j
belong to (0, n
1
)
and (0, n
2
)
respectively.
the distance between two points is sum of absolute difference between coordinates
distance between top of pillars = |xi-xj| + |yi-yj| + |zi-zj|
distance of a tunnel = |xi-xj| + |yi-yj|
2<=n
1
, n
2
<=20
0<=coordinates<=1000000
First line contains space separated n
1
and n
2
.
Followed by space separated m
1
and m
2
.
Followed by space separated T
1
and T
2
.
Following n
1
lines contain x
and y
coordinates separated by spaces.
Following n
2
lines contain x
, y
and z
coordinates separated by spaces.
Following m
1
lines contain space separated p
i
and p
j
Following m
2
lines contain space separated a
i
and a
j
If lucario will win output "lucario as always"
otherwise if dugtrio will win output "dugtrio got better luck today"
otherwise if both will reach at same time output "not in mood to bet"
.
3 3
1 1
2 3
0 0
1 1
2 2
0 0 0
1 1 1
2 2 2
0 1
1 2
0 1
0 2
1 2
dugtrio got better luck today
4 6
3 5
4 7
0 0
2 0
2 1
1 2
0 0 0
0 0 1
1 0 1
1 1 1
1 1 0
2 1 0
0 1
1 2
2 3
1 3
0 1
1 2
2 3
3 4
4 5
0 5
2 5
not in mood to bet