Skip to content

devanshusingla/cp_question

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

cp_question

first self made cp question for pclub secy test

Earth vs Fighting

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 t0 and b0.Dugtrio and Lucario take time T1 and T2 respectively. Lucario has to move on pillars, with top of pillar i represented by bi. Dugtrio has to go through tunnels linked at some places, which each such place i represented by ti. There are n2 pillars and lucario has to reach to pillar n2-1 to win. The pillars between which Lucario can jump are pi and pj and number of such possible jumps are m1. There are n1 interlinks between tunnels and dugtrio has to reach end of this tunnel maze which is at n1-1. The tunnels are joined by ai and aj. You have to place your bet on one pokemon. On which pokemon will you place your bet to become richer?

values of bi and tj are i and j respectively and i and j belong to (0, n1) and (0, n2) 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<=n1, n2<=20 0<=coordinates<=1000000

INPUT

First line contains space separated n1 and n2. Followed by space separated m1 and m2. Followed by space separated T1 and T2. Following n1 lines contain x and y coordinates separated by spaces. Following n2 lines contain x, y and z coordinates separated by spaces. Following m1 lines contain space separated pi and pj Following m2 lines contain space separated ai and aj

OUTPUT

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".

EXAMPLE 1

INPUT

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

OUTPUT

dugtrio got better luck today

EXAMPLE 2

INPUT

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

OUTPUT

not in mood to bet

About

first self made cp question for pclub secy test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages