# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
388741 | 2021-04-12T19:08:31 Z | Pichon5 | 삶의 질 (IOI10_quality) | C++17 | 5000 ms | 3808 KB |
#include "quality.h" #include <bits/stdc++.h> #define vi vector<vi> #define ll long long int #define pb push_back using namespace std; int rectangle(int R, int C, int H, int W, int Q[3001][3001]) { //R rows //C columns // H de hight //W de weihght int M[3001][3001]; for(int i=1;i<=R*C;i++){ for(int j=0;j<R;j++){ for(int k=0;k<C;k++){ M[j][k]=0; if(Q[j][k]>i)M[j][k]=1; if(Q[j][k]<i)M[j][k]=-1; } } for(int j=0;j<R;j++){ for(int k=0;k<C;k++){ if(j)M[j][k]+=M[j-1][k]; if(k)M[j][k]+=M[j][k-1]; if(j>0 && k>0)M[j][k]-=M[j-1][k-1]; } } for(int j=0;j+H<=R;j++){ for(int k=0;k+W<=C;k++){ int sum=M[j+H-1][k+W-1]; if(j)sum-=M[j-1][k+W-1]; if(k)sum-=M[j+H-1][k-1]; if(j>0 && k>0)sum+=M[j-1][k-1]; if(sum==0){ return i; } } } } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 564 KB | Output is correct |
2 | Correct | 3 ms | 460 KB | Output is correct |
3 | Correct | 2 ms | 460 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 564 KB | Output is correct |
2 | Correct | 3 ms | 460 KB | Output is correct |
3 | Correct | 2 ms | 460 KB | Output is correct |
4 | Correct | 248 ms | 1228 KB | Output is correct |
5 | Correct | 240 ms | 1228 KB | Output is correct |
6 | Correct | 242 ms | 1228 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 564 KB | Output is correct |
2 | Correct | 3 ms | 460 KB | Output is correct |
3 | Correct | 2 ms | 460 KB | Output is correct |
4 | Correct | 248 ms | 1228 KB | Output is correct |
5 | Correct | 240 ms | 1228 KB | Output is correct |
6 | Correct | 242 ms | 1228 KB | Output is correct |
7 | Execution timed out | 5091 ms | 3808 KB | Time limit exceeded |
8 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 564 KB | Output is correct |
2 | Correct | 3 ms | 460 KB | Output is correct |
3 | Correct | 2 ms | 460 KB | Output is correct |
4 | Correct | 248 ms | 1228 KB | Output is correct |
5 | Correct | 240 ms | 1228 KB | Output is correct |
6 | Correct | 242 ms | 1228 KB | Output is correct |
7 | Execution timed out | 5091 ms | 3808 KB | Time limit exceeded |
8 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 564 KB | Output is correct |
2 | Correct | 3 ms | 460 KB | Output is correct |
3 | Correct | 2 ms | 460 KB | Output is correct |
4 | Correct | 248 ms | 1228 KB | Output is correct |
5 | Correct | 240 ms | 1228 KB | Output is correct |
6 | Correct | 242 ms | 1228 KB | Output is correct |
7 | Execution timed out | 5091 ms | 3808 KB | Time limit exceeded |
8 | Halted | 0 ms | 0 KB | - |