# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
90527 | tjrwodnjs999 | 볼질 (OJUZ10_ballparade) | C++11 | 7 ms | 2500 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int n,m,a,b,c,d,cnt;
int main(){
scanf("%d",&n);
while(n--){
scanf("%d",&m);
if(m==1) d++;
if(m==2||d==4){
if(c&&b&&a) cnt++,c=0;
if(b&&a) c=1,b=0;
if(a) b=1;
a=1; d=0;
}
if(m==3){
if(c) cnt++,c=0;
if(b) c=1,b=0;
if(a) b=1,a=0;
d++;
if(d==4) d=0,a=1;
}
}
printf("%d",cnt);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |