Cod sursa(job #2455494)

Utilizator victorv88Veltan Victor victorv88 Data 11 septembrie 2019 20:27:33
Problema Pachete Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.78 kb
/// Pe cadrane greedy cu cautare binara.

#include <iostream>
#include <fstream>

using namespace std;

ifstream f("pachete.in");
ofstream g("pachete.out");

int m, start_x, start_y, a, b;

vector<pair<int,int>>cadran[5];

void citire()
{
    f >> m;
    f >> start_x >> start_y;
    for (int i=1; i<=m; ++i)
    {
        f >> a >> b;
        if (a>=start_x && b>=start_y)
        cadran[1].push_back({a,b});
        else if (a<=start_x && b>=start_y)
        {
            cadran[2].push_back({a,b});
        }
        else if (a<=start_x && b<=start_y)
        cadran[3].push_back({a,b});
        else
        cadran[4].push_back({a,b});
    }
}

void c1()
{

}

int main()
{
    citire();
    c1();
    c2();
    c3();
    c4();
    return 0;
}