Sponsors

Tag: problem: (C) Okabe and Boxes Solution In C/C++

Codeforces Round #420 (Div....

#include <cstdio> using namespace std; int n,s,top; int main() { int i,j,ans=0; char op; scanf("%d",&n); for(i=j=1;i<=2*n;++i) { scanf("%s",op); if(op=='a') scanf("%d",&s); else { if(top) { if(s==j) --top; else...

Advertisement

spot_img