Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 406 Weeks Ago, 2 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 17 Sep 2017 My Price 6.00

number of Master bombs.

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.

 

 

Input

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

 

Output the number of Master bombs.

 

Constraints

1

Example

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

Answers

(5)
Status NEW Posted 17 Sep 2017 05:09 AM My Price 6.00

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

Not Rated(0)