Cod sursa(job #1489480)

Utilizator eu3neuomManghiuc Teodor-Florin eu3neuom Data 21 septembrie 2015 10:51:28
Problema A+B Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.55 kb
#include <bits/stdc++.h>

using namespace std;

ifstream fin("queue.in");
ofstream fout("queue.out");

const int Sigma = 30;

char bucket[Sigma];
inline void Read(int &x, bool &operation){
    fin >> bucket;
    if(bucket[1] == 'o'){
        operation = 1;
    } else {
        operation = 0;
    }
    x = 0;
    for(int i = 10; isdigit(bucket[i]); i++){
        x = x * 10 + (bucket[i] - '0');
    }
}

int main(){
    int n, x;
    bool operation;
    fin >> n;
    while(n--){
        Read(x, operation);
    }
    return 0;
}