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 1.00
C++ 1.00
C++14 1.00
C# 3.00
Go 3.00
Java 3.00
JavaScript 3.00
Objective-C 3.00
Perl 3.00
PHP 3.00
Python 3.00
Python3 3.00
Ruby 3.00
VB.Net 3.00

Problem Stats

75/549

Solve/Submission

Ranking

# User Language Timing
01 haasib Cpp14 0.00s
02 lazyfahim Cpp14 0.00s
03 gazi93 Cpp14 0.00s
04 maxhasan Cpp14 0.00s
05 terminator_c Cpp14 0.00s
06 MAHRahat Cpp14 0.00s
07 HM39 Cpp14 0.00s
08 deder Cpp14 0.00s
09 gsshanto Cpp14 0.00s
10 jualahmed Cpp14 0.00s
11 mahbub07 Cpp14 0.00s
12 joy25896 Cpp14 0.00s
13 Saimum_140128 Cpp14 0.00s
14 smriad Cpp14 0.00s
15 jayed_al_hasan Cpp14 0.00s
16 lolcoder Cpp14 0.00s
17 mahathir Cpp14 0.00s
18 emrul Cpp14 0.00s
19 1604118 Cpp14 0.00s
20 tanhakabir Cpp14 0.00s
21 esha1604103 Cpp14 0.00s
22 soumitro_cse1604114 Cpp14 0.00s
23 1604099_ishtiaq Cpp14 0.00s
24 skrasel126 Cpp14 0.00s
25 jalal Cpp 0.00s
26 CSE1604084_Mahir C 0.00s
27 Dragon_162 Cpp14 0.00s
28 opu1604073 C 0.00s
29 Tuli_93 C 0.00s
30 1604110 C 0.00s
31 Alamgir_1604069 C 0.00s
32 ashish_pondit Cpp 0.00s
33 Sabiha_1604070 C 0.00s
34 joymollick C 0.00s
35 Nazmul0092 Cpp 0.00s
36 Anika_Bushra Cpp14 0.00s
37 Afif_Fahim C 0.00s
38 sumaiya710 C 0.00s
39 CSE1604085_nishan Cpp 0.00s
40 Rahnuma1604103 Cpp14 0.01s
41 pulak_ict_mbstu Cpp14 0.01s
42 afzalul Cpp14 0.01s
43 mehadi_shuvo Cpp14 0.01s
44 gulzar Cpp14 0.01s
45 sadia2427 Cpp14 0.01s
46 rayhan50001 Cpp14 0.01s
47 mhsjaber CSharp 0.02s
48 marineCoder Cpp14 0.07s
49 Md_Abid Cpp14 0.07s
50 shahir099 Cpp14 0.07s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support