Cod sursa(job #2767839)

Utilizator DragosC1Dragos DragosC1 Data 7 august 2021 22:48:46
Problema Fructe Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.32 kb
#include <fstream>
using namespace std;

int main() {
    int n, x, y;
    ifstream f("fructe.in");
    ofstream g("fructe.out");
    f >> n;
    while (n--) {
        f >> x >> y;
        if (y & 1)
            g << 1 << '\n';
        else g << 0 << '\n';
    }
    f.close();
    g.close();
    return 0;
}