Submission #383511

#TimeUsernameProblemLanguageResultExecution timeMemory
383511alireza_kavianiArt Class (IOI13_artclass)C++11
16 / 100
81 ms3456 KiB
#include <bits/stdc++.h>
#include "artclass.h"
using namespace std;

int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
    int r = 0 , g = 0 , b = 0;
	for(int i = 0 ; i < 500 ; i++){
		for(int j = 0 ; j < 500 ; j++){
			r += R[i][j];
			g += G[i][j];
			b += B[i][j];
		}
	}
	int rm = r / (H * W) , gm = g / (H * W) , bm = b / (H * W);
	int val = rm + gm + bm;
	//cout << rm << ' ' << gm << ' ' << bm << ' ' << val << endl;
	if(val >= 470)	return 1;
	if(val <= 310)	return 2;
	if(rm >= 150)	return 4;
	return 3;
}
#Verdict Execution timeMemoryGrader output
Fetching results...