Cod sursa(job #2497412)

Utilizator razviii237Uzum Razvan razviii237 Data 22 noiembrie 2019 16:57:25
Problema A+B Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.49 kb
#include <iostream>
#include <fstream>
#include <vector>

using namespace std;

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

const int maxn = 1e3+5;

struct xy { int x, y; };
vector <xy> a[maxn];

int main()
{
    f >> t;
    if(t == 1) {
        f >> n >> m;
        for(i = 1; i <= m; i ++) {
            f >> c >> x >> y;
            cost = (c == 'N' ? 1 : 0);
            a[x].push_back(y, cost);
        }
    }

    f.close(); g.close();
    return 0;
}