Submission #14205

#TimeUsernameProblemLanguageResultExecution timeMemory
14205khsoo01볼질 (OJUZ10_ballparade)C++98
100 / 100
6 ms1084 KiB
#include<cstdio> int i,b[4],c,n,t,s; main() { scanf("%d",&n); for(;i<n;i++) { scanf("%d",&t); if(t==1)c++; if(t==3) { c++; s+=b[3]; b[3]=b[2]; b[2]=b[1]; b[1]=0; } if(c==4 || t==2) { if(b[1]==1) { if(b[2]==1) { if(b[3]==1)s++; b[3]=1; } b[2]=1; } b[1]=1; c=0; } } printf("%d",s); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...