All submissions for this problem are available.
In the climax of an upcoming Bollywood movie "BHAI HO!", Bhai is standing at the centre of a large battlefield. Bhai is sorrounded by the army of Bacchha Singh from all sides. Each soldier of Bacchha's army is at some distance from Bhai. They all are heading towards Bhai with swords in their hands. At the centre, Bhai has a gun with unlimited Bullets. And you know, Bhai never misses a shot!. But a hurdle to Bhai is that he has to reload the gun after he has fired 6 bullets.
Bhai is killing soldiers at one soldier per second. By this time, every other soldier moves a step towards Bhai. Also, the reloading of the gun takes one second.
Now, you have to tell whether Bhai will be able to survive or not. And if Bhai fails in killing them all, tell the Number of soldiers killed by Bhai before falling.
The first line of input contains an integer T, denoting the number of test cases.
T test cases follow. In each test case, the first line contains an integer N, denoting the number of soldiers.
In the next line, there are N integers representing the distance of each soldier from Bhai.
For each test case Print the result as:
If Bhai survives:
if Bhai fails:
Here M is the number of soldiers Bhai killed before dying.
- 1 <= T <=100
- 1 <= N <=50000
- 1 <= D[i] <= 50000
Input: 2 5 3 4 3 7 9 5 3 3 3 3 3 Output: Bhai Ho! Killed 3
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions