The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 406 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
In a war of Wasseypur, Faizal Khan was desperate to kill Sultan. He already knew Sultan was going to attack him.
Â
Sultan has to meet an important person in Kabal Bagh. Since Faizal Khan somehow, is aware of Sultan's meeting, he has planted master-bombs in the park. Sultan, somehow, had the premonition of Faizal's plan.
He took along with him bomb diffuser.
Â
But each Master bomb is surrounded by either wall or bombs on each side (north,east,west,south).
As soon as Sultan reaches the garden he notes down the coordinates of the bombs that have been planted.
Now he has to count the Master bombs that have been placed on the area.
Â
Given position of all the bombs help Sultan to count the number of Master Bombs so that he can diffuse them.
Â
Â
First line contains t, the number of test cases. The next line contains n, the number of bombs in the grid. Next n lines contain the coordinates of the bombs (xi,yi).
Â
Output the number of Master bombs.
Â
1
Input: 2 5 1 1 0 1 1 0 6 1 1 9 8 1 1 4 2 3 1 1 2 0 2 0 1 1 0 1 3 Output: 1 2
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll