# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
48810 | 2018-05-19T03:35:59 Z | leehosu01 | 여왕벌 (KOI15_queen) | C++17 | 5000 ms | 44128 KB |
#include<bits/stdc++.h> using namespace std; int M,N; #define L DT[i][j-1] #define U DT[i-1][j] #define D DT[i-1][j-1] char S[700][700][28],DT[700][700]; int mat[700][700]; int main() { cin>>M>>N;int i,j,t; for(i=1;i<M;i++) for(j=1;j<M;j++) scanf("%s",S[i][j]); int A,B,C; for(t=0;t<N;t++) { scanf("%d%d%d",&A,&B,&C); for(i=M-1;i>=0;i--) { if(A)DT[i][0]=0,--A; else if(B)mat[i][0]+=(DT[i][0]=1),--B; else if(C)mat[i][0]+=(DT[i][0]=2),--C; } for(i=1;i<M;i++) { if(A)DT[0][i]=0,--A; else if(B)mat[0][i]+=(DT[0][i]=1),--B; else if(C)mat[0][i]+=(DT[0][i]=2),--C; }char T; for(i=1;i<M;i++) { for(j=1;j<M;j++) { T=S[i][j][L *9+D *3+ U]; mat[i][j]+=(DT[i][j]=(T=='L'?L:T=='U'?U:D)); } } } for(i=0;i<M;i++) { for(j=0;j<M;j++) printf("%d ",mat[i][j]+1); printf("\n"); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 484 KB | Output is correct |
3 | Correct | 6 ms | 1464 KB | Output is correct |
4 | Correct | 5 ms | 1596 KB | Output is correct |
5 | Correct | 32 ms | 5368 KB | Output is correct |
6 | Correct | 31 ms | 5368 KB | Output is correct |
7 | Correct | 41 ms | 5440 KB | Output is correct |
8 | Correct | 79 ms | 11588 KB | Output is correct |
9 | Correct | 82 ms | 11604 KB | Output is correct |
10 | Correct | 197 ms | 17344 KB | Output is correct |
11 | Correct | 157 ms | 30820 KB | Output is correct |
12 | Correct | 157 ms | 44128 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 14 ms | 44128 KB | Output is correct |
2 | Execution timed out | 5038 ms | 44128 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 10 ms | 44128 KB | Output is correct |
2 | Correct | 923 ms | 44128 KB | Output is correct |
3 | Execution timed out | 5005 ms | 44128 KB | Time limit exceeded |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 5027 ms | 44128 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 44128 KB | Output is correct |
2 | Correct | 2 ms | 44128 KB | Output is correct |
3 | Correct | 2 ms | 44128 KB | Output is correct |
4 | Correct | 2 ms | 44128 KB | Output is correct |
5 | Correct | 291 ms | 44128 KB | Output is correct |
6 | Correct | 325 ms | 44128 KB | Output is correct |
7 | Correct | 291 ms | 44128 KB | Output is correct |
8 | Correct | 295 ms | 44128 KB | Output is correct |
9 | Execution timed out | 5043 ms | 44128 KB | Time limit exceeded |
10 | Halted | 0 ms | 0 KB | - |