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

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

    punct p[101];
    int n, cntx = 0, cnty = 0;   /*
    cin >> n;

    for(int i = 1; i <= n; i++)
    {
        cin >> p[i].x >> p[i].y;
        if(p[i].y == 0)
            cntx++;
        if(p[i].x == 0)
            cnty++;
    }

    cout << cntx << ' ' << cnty; */

    /*
    cin >> n;

    for(int i = 1; i <= n; i++)
        cin >> p[i].x >> p[i].y;


    for(int i = 1; i <= n; i++)
        if(p[i].x > 0 && p[i].y < 0)
            cout << p[i].x << ' ' << p[i].y << '\n';
    */
    int cnt = 0;

    cin >> n;
    for(int i = 1; i <= n; i++)
    {
        cin >> p[i].x >> p[i].y;
        if(p[i].x <= 0)
            cnt++;
    }
    cout << cnt << '\n';

    for(int i = 1; i <= n; i++)
        if(p[i].x <= 0)
            cout << p[i].x << ' ' << p[i].y << '\n';


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