# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
48809 | 2018-05-19T03:35:05 Z | leehosu01 | 여왕벌 (KOI15_queen) | C++17 | 5000 ms | 121788 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 | 3 ms | 632 KB | Output is correct |
2 | Correct | 7 ms | 632 KB | Output is correct |
3 | Correct | 6 ms | 1960 KB | Output is correct |
4 | Correct | 6 ms | 2192 KB | Output is correct |
5 | Correct | 32 ms | 8540 KB | Output is correct |
6 | Correct | 32 ms | 10988 KB | Output is correct |
7 | Correct | 30 ms | 13648 KB | Output is correct |
8 | Correct | 88 ms | 26484 KB | Output is correct |
9 | Correct | 92 ms | 33384 KB | Output is correct |
10 | Runtime error | 126 ms | 67388 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
11 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 10 ms | 67388 KB | Output is correct |
2 | Execution timed out | 5021 ms | 67388 KB | Time limit exceeded |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 10 ms | 67388 KB | Output is correct |
2 | Correct | 994 ms | 67388 KB | Output is correct |
3 | Execution timed out | 5102 ms | 72264 KB | Time limit exceeded |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 5007 ms | 79320 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 79320 KB | Output is correct |
2 | Correct | 2 ms | 79320 KB | Output is correct |
3 | Correct | 2 ms | 79320 KB | Output is correct |
4 | Correct | 2 ms | 79320 KB | Output is correct |
5 | Correct | 300 ms | 79320 KB | Output is correct |
6 | Correct | 295 ms | 80624 KB | Output is correct |
7 | Correct | 336 ms | 86628 KB | Output is correct |
8 | Correct | 497 ms | 92504 KB | Output is correct |
9 | Execution timed out | 5017 ms | 121788 KB | Time limit exceeded |
10 | Halted | 0 ms | 0 KB | - |