Untitled
raw download clone
CPP
views 41
,
size 377 b
#include <iostream>
using namespace std;

int main ()
{
    struct punct
    {
        int x, y;
    };

    punct p;
    int n, cntx = 0, cnty = 0;
    cin >> n;

    while(n)
    {
        cin >> p.x >> p.y;
        if(p.y == 0)
            cntx++;
        if(p.x == 0)
            cnty++;

        n--;
    }

    cout << cntx << ' ' << cnty;

}
close fullscreen
Login or Register to edit or fork this paste. It's free.