# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1100969 | alexander707070 | 미술 수업 (IOI13_artclass) | C++14 | 56 ms | 6172 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<iostream>
#include "artclass.h"
using namespace std;
bool iswhite(int r,int g,int b){
return r>=200 and g>=200 and b>=200;
}
long long diff;
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
int br=0;
diff=0;
for(int i=0;i<H;i++){
for(int f=0;f<W;f++){
if(iswhite(R[i][f],G[i][f],B[i][f]))br++;
if(f<W-1)diff+=abs(R[i][f]-R[i][f+1]) + abs(G[i][f]-G[i][f+1]) + abs(B[i][f]-B[i][f+1]);
}
}
if(br>=70000)return 1;
if(diff<=1500000)return 4;
return 2;
//cout<<diff<<"\n";
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |