제출 #396419

#제출 시각아이디문제언어결과실행 시간메모리
396419bigg미술 수업 (IOI13_artclass)C++14
3 / 100
87 ms6228 KiB
#include "artclass.h" #include<bits/stdc++.h> using namespace std; const int MAXN = 510; int med[MAXN][MAXN], ultcol[MAXN][MAXN], ultlin[MAXN][MAXN]; int qtascol, qtaslin; int style(int H, int W, int r[500][500], int g[500][500], int b[500][500]) { for(int i = 0; i < H; i++){ for(int j = 0; j < W; j++){ med[i][j] = r[i][j] + g[i][j] + b[i][j]; med[i][j] /= 3; } } for(int i = 0; i < H; i++){ for(int j = 0; j < W; j++){ if(med[i][j] < 220) ultlin[i][j] = 0; else{ if(ultlin[i-1][j] != 0) ultlin[i][j] = ultlin[i-1][j]; else ultlin[i][j] = i; if(abs(i - ultlin[i][j]) > 63) qtaslin++; } } } for(int i = 0; i < H; i++){ for(int j = 0; j < W; j++){ if(med[i][j] > 30) ultcol[i][j] = 0; else{ if(ultcol[i][j-1] != 0) ultlin[i][j] = ultlin[i][j-1]; else ultlin[i][j] = j; if(abs(j - ultcol[i][j]) > 63) qtascol++; } } } if(qtascol + qtaslin > 50000) return 1; return 4; // return 2; }
#Verdict Execution timeMemoryGrader output
Fetching results...