# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
117174 | onjo0127 | 단층 (JOI16_ho_t5) | C++11 | 29 ms | 8312 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int O = 500;
int A[1009][1009];
int main() {
int N, Q; scanf("%d%d",&N,&Q);
for(int i=0; i<=1000; i++) {
for(int j=0; j<=1000; j++) {
A[i][j] = i;
}
}
while(Q--) {
int X, D, L; scanf("%d%d%d",&X,&D,&L); X += O;
if(D == 1) {
for(int i=0; i<=1000; i++) {
for(int j=X-i; j>=1; j--) {
A[i][j] = A[i+1][j-1];
}
}
}
if(D == 2) {
for(int i=0; i<=1000; i++) {
for(int j=X+i+1; j<=1000; j++) {
A[i][j] = A[i+1][j+1];
}
}
}
}
for(int i=O+1; i<=O+N; i++) printf("%d\n", A[0][i]);
return 0;
}
컴파일 시 표준 에러 (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... |