# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
715992 | Nonoze | 미술 수업 (IOI13_artclass) | C++17 | 144 ms | 11140 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 <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]) {
map<tuple<int, int, int>, bool> verif;
int comp=0, compvert=0;
for (int i = 0; i < H; ++i)
{
for (int j = 0; j < W; ++j)
{
if (!verif.count(make_tuple(R[i][j], G[i][j], B[i][j])))
{
comp++;
}
verif[make_tuple(R[i][j], G[i][j], B[i][j])]=true;
if (G[i][j]>=200 && R[i][j]<=200 && B[i][j]<=200)
{
compvert++;
}
}
}
//cout << comp << endl;
double moyenne=(double)comp/((double)H*(double)W), moyennevert=(double)compvert/((double)H*(double)W);
//cout << moyenne << " " << moyennevert << endl;
if (moyennevert>=0.001) return 2;
if (comp>=60000)
{
return 2;
}
if (comp>=30000)
{
return 3;
}
if (comp>=17000)
{
return 1;
}
return 4;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |