제출 #64130

#제출 시각아이디문제언어결과실행 시간메모리
64130MKopchev미술 수업 (IOI13_artclass)C++14
0 / 100
122 ms15908 KiB
//I want to test the ML issue
#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 (totg>70) {
    //probably class 2
    return 2;
  }
  if (totg+totr+totb<400) return 1;
  if (totg>totr+totb || totr>totg+totb || totb>totg+totr) return 4;
  //Check for 10*10 square that is relatively white
  return 3;
}
#Verdict Execution timeMemoryGrader output
Fetching results...