Submission #1012541

#TimeUsernameProblemLanguageResultExecution timeMemory
1012541parsadox2Art Class (IOI13_artclass)C++17
Compilation error
0 ms0 KiB
#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;
}*/

Compilation message (stderr)

/usr/bin/ld: /tmp/ccgbjxGh.o: in function `main':
grader.c:(.text.startup+0x200): undefined reference to `style'
collect2: error: ld returned 1 exit status