| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 235920 | cfalas | 미술 수업 (IOI13_artclass) | C++14 | 93 ms | 3320 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#include "artclass.h"
typedef pair<int, int> ii;
typedef pair<int, ii> iii;
#define F first
#define S second
int style(int h, int w, int r[500][500], int g[500][500], int b[500][500]) {
int blackcount=0;
int wcount=0;
int gcount=0;
double stdb,stdr,stdg;
double totb=0,totg=0,totr=0;
double sfrr=0,sfgg=0,sfbb=0;
double pix = h*w;
double dev=0;
double devv=0, dcnt=0;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
if(r[i][j]+b[i][j]+g[i][j]<=50) blackcount++;
else if(r[i][j]+b[i][j]+g[i][j]>=700) wcount++;
if(g[i][j]>=150) gcount++;
totb+=b[i][j];
sfbb+=b[i][j]*b[i][j];
totr+=r[i][j];
sfrr+=r[i][j]*r[i][j];
if(i!=0) dev+=abs(r[i][j]-r[i-1][j]), dcnt++, devv+=(r[i][j]-r[i-1][j])*(r[i][j]-r[i-1][j]);
if(j!=0) dev+=abs(r[i][j]-r[i][j-1]), dcnt++, devv+=(r[i][j]-r[i][j-1])*(r[i][j]-r[i][j-1]);
if(i!=h-1) dev+=abs(r[i][j]-r[i+1][j]), dcnt++, devv+=(r[i][j]-r[i+1][j])*(r[i][j]-r[i+1][j]);
if(j!=w-1) dev+=abs(r[i][j]-r[i][j+1]), dcnt++, devv+=(r[i][j]-r[i][j+1])*(r[i][j]-r[i][j+1]);
}
}
stdb = sqrt(sfbb/pix - (totb/pix)*(totb/pix));
stdr = sqrt(sfrr/pix - (totr/pix)*(totr/pix));
double devstd = sqrt(devv/dcnt - (dev/dcnt)*(dev/dcnt));
//cout<<gcount/((double)h*w)<<endl;
//cout<<blackcount<<endl;
//cout<<devstd<<endl;
if(devstd<8) return 4;
if(devstd>25) return 3;
if(wcount>0.1*h*w) return 1;
if(gcount>0.11*h*w) return 2;
return 2;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
