# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
396419 | bigg | Art Class (IOI13_artclass) | C++14 | 87 ms | 6228 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |