You are not logged in. Please login at www.codechef.com to post your questions!

×

# PROBLEM LINK:

Contest

Author: Md Shahid

Tester: Arkapravo Ghosh

Editorialist: Md Shahid

SIMPLE

Given h,d and u.

# EXPLANATION:

In this problem Jagga can only run away if he get a car. One of his friend is standing at the top of building of height 'h' having key of car which is near Jagga. Police is following Jagga and Jagga is running at the constant speed of 'u'.His friend standing at the top of building throw that key of car if Jagga can catch the key then he can start the car at time and run away If he fails to do so he will be caught by police.Here you have to find time to reach Jagga at the position where the key have been thrown and the time to reach the key from top of the building to ground.

Time taken to reach Jagga at position where the key has been thrown = Tg

Time taken to reach the key from top of the building to ground = Tk

Formula used :

1. S= V*t
2. S = Ut + (1/2)g*(t^2)

Where V= final velocity, U=initial velocity, X=distance covered in time 't', g=acceleration due to gravity.

Here initial velocity U is zero.

- Tg= (d/u) using formula 1.
- d= 0 + (1/2)*g*(Tk^2) i.e., Tk= (2*d/g)^0.5


if Tk >= Tg, print "Run away"

else, print "Caught"

# AUTHOR'S AND EDITORIALIST'S SOLUTIONS:

Author's and editorialist’s solution can be found here.

Tags:- ENCODING CTKL dshahid380

This question is marked "community wiki".

asked 15 Sep, 21:09

203
accept rate: 0%

0★admin ♦♦
19.6k349497540

 toggle preview community wiki:
Preview

### Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• link:[text](http://url.com/ "title")
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×23

question asked: 15 Sep, 21:09

question was seen: 213 times

last updated: 11 Oct, 17:13