Submission #61315

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
613152018-07-25 15:49:55dukati8Art Class (IOI13_artclass)C++14
7 / 100
121 ms3580 KiB
#include <stdio.h>
#include "artclass.h"
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define rep(i,a,b) for(int i=a;i<int(b);i++)
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
//Check sum of all pixels
double totr,totb,totg;
totr=0;totb=0;totg=0;
rep (i,0,H) {
rep (j,0,W) {
totr+=R[i][j];
totb+=B[i][j];
totg+=G[i][j];
}
}
totr/=H*W;
totb/=H*W;
totg/=H*W;
double hi=max(totr,max(totg,totb));
double lo=min(totr,min(totg,totb));
double med=totr+totg+totb-hi-lo;
double diff1=hi-med;
double diff2=med-lo;
//cout << totr << " " << totg << " " << totb<<endl;
if (lo*1.7<hi) return 4;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...