Pagini recente » Cod sursa (job #277563) | Cod sursa (job #424536) | Cod sursa (job #1274855) | Cod sursa (job #273418) | Cod sursa (job #1489480)
#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;
}