# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1012541 | parsadox2 | Art Class (IOI13_artclass) | C++17 | 0 ms | 0 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>
using namespace std;
int sr[500][500] , sg[500][500] , sb[500][500];
int style(int h , int w , int R[500][500] , int G[500][500] , int B[500][500])
{
srand(time(NULL));
int sum = 0 , all = 0;
for(int i = 0 ; i < w ; i++) for(int j = 0 ; j < h ; j++)
{
all++;
int r = R[i][j] , g = G[i][j] , b = B[i][j];
if(g + 15 > r && g + 15 > b)
sum++;
}
all -= sum;
cout << sum << " " << all << endl;
all += all/5;
vector <int> vec = {1 , 3 , 4};
if(sum + 100 >= all)
return 2;
return vec[rand() % 3];
}
/*signed main()
{
freopen("sample1-06" , "r" , stdin);
int h , w;
cin >> h >> w;
for(int i = 0 ; i < w ; i++) for(int j = 0 ; j < h ; j++)
{
cin >> sr[i][j] >> sg[i][j] >> sb[i][j];
}
cout << style(h , w , sr , sg , sb) << endl;
return 0;
}*/