# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
61277 | dukati8 | Art Class (IOI13_artclass) | C++14 | 135 ms | 3616 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;
#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;
cout << totr << " " << totg << " " << totb<<endl;
if (totb<totg && totg<totr) {
//probably class 2
return 2;
}
//Check for 10*10 square that is relatively white
return 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |