| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1358089 | kmath628 | 볼질 (OJUZ10_ballparade) | C++20 | 2 ms | 344 KiB |
#include <bits/stdc++.h>
int main(){
int n,a=0,b=0,c=0,B=0,S=0,v;
scanf("%d",&n);
while(n--){
scanf("%d",&v);
if(v==1) B++;
else if(v==2) B=4;
else{
B++;
if(c==1) S++;
c=b; b=a; a=0;
if(B==4) a=1, B=0;
}
if(B==4){
if(a==1 && b==1 && c==1) S++;
else if(a==1 && b==1) c=1;
else if(a==1) b=1;
else a=1;
B=0;
}
}
printf("%d\n",S); return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
