DCP-33: Catch Me If You Can Back to All Problems

Beginner Beginners Problems > Ad-hoc


Anindya and Abir are best buddies . They are very good programmers . Besides that, they have hidden Identity . Anindya is an undercover super cop and Abir is a real life robin hood but is a dangerous robber in the eye of law . Abir robs black money from rich people and give it back to the poor . As Abir is a very good programmer , he uses all types of modern instruments and never left any evidence of the crime scene . So unless Anindya catches Abir in red handed , he can’t prove anything against him . Unfortunately , today Abir makes a mistake and Anindya is behind him . But Abir has an invincible watch same as like the movie “Mr India” . Whenever he presses his invincible watch it needs some time say T to active and then Abir becomes invincible and no one able to catch him . Anindya has a constant velocity **v1 ( 1 <= v1 <= 100 )** and Abir has a constant velocity **v2 ( 1 <= v2 <= 100 )** and distance between them is right now **d ( 0 <= d <= 100 )** . Abir needs **T ( 0 <= T <= 100 )** time to active his invincible watch . Can you tell us what will happen to Abir ? If Abir can survive this T seconds then there is no way Anindya can catch Abir . For this scenario you need to print “Abir will survive” otherwise print “Abir will be arrested” Input: ------ Input starts with an integer **TC ( TC <= 100 )** denoting number of test cases . Each of them consists of four integers **v1** ( Anindya’s constant velocity ) , **v2** ( Abir’s constant velocity ) , **d** ( Distance between Abir and Anindya ) , **T** ( Time to active the invincible watch ) Output: ------- For each test case first print the case number “**Case %d:** ” then print “Abir will survive” if Abir able to escape from Anindya otherwise print “Abir will be arrested”. Sample Input ------------ 2 3 2 1 1 3 2 1 2 Sample Output ------------- Case 1: Abir will survive Case 2: Abir will be arrested


Problem Setter:

Shakil Ahmed

Please login to submit solution to this problem.

Problem Limits

Language Time Limit (seconds)
C/C++ 1.00
Java 3.00
C# 3.00
PHP 3.00

Problem Stats

45/366

Solve/Submission

Ranking

# User Language Timing
01 haasib Cpp 0.00s
02 lazyfahim Cpp 0.00s
03 gazi93 Cpp 0.00s
04 maxhasan Cpp 0.00s
05 terminator_c Cpp 0.00s
06 mahrahat Cpp 0.00s
07 HM39 Cpp 0.00s
08 deder Cpp 0.00s
09 gsshanto Cpp 0.00s
10 jualahmed Cpp 0.00s
11 mahbub07 Cpp 0.00s
12 joy25896 Cpp 0.00s
13 Saimum_140128 Cpp 0.00s
14 smriad Cpp 0.00s
15 jayed_al_hasan Cpp 0.00s
16 lolcoder Cpp 0.00s
17 mahathir Cpp 0.00s
18 emrul Cpp 0.00s
19 gulzar Cpp 0.01s
20 sadia2427 Cpp 0.01s
21 rayhan50001 Cpp 0.01s
22 mhsjaber CSharp 0.02s
23 marineCoder Cpp 0.07s
24 Md_Abid Cpp 0.07s
25 shahir099 Cpp 0.07s
26 Dinar Cpp 0.08s
27 showmic Cpp 0.39s
28 nafiz0080 Cpp 0.40s
29 jalal Cpp 0.48s
30 moin132 Cpp 0.48s
31 mdtameemkhan Cpp 0.48s
32 7Mahfuz Cpp 0.49s
33 Sabyasachi Cpp 0.49s
34 Ridwan_bracu Java 0.58s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support