| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 28491 | 三( ε:) (#68) | 1-Color Coloring (FXCUP2_coloring) | C++14 | 0 ms | 2028 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 "coloring.h"
#include <bits/stdc++.h>
using namespace std;
void ColoringSame(int N)
{
	vector<int> hubo;
	for (int i = 2; i <= N; i++) hubo.push_back(i);
	int rem = 7300;
	while (hubo.size() > 1)
	{
		for (int j = 0; j < hubo.size() / 2; j++)
		{
			Color(hubo[j]);
			--rem;
		}
		if (GetColor(1) == 1)
		{
			hubo.erase(hubo.begin(), hubo.begin() + hubo.size() / 2);
		}
		else
		{
			hubo.erase(hubo.begin() + hubo.size() / 2, hubo.end());
		}
	}
	int backcolor = hubo[0];
	vector<int> x;
	for (int i = 2; i <= N; i++) if (i != backcolor) x.push_back(i);
	mt19937 mt{ random_device{}() };
	shuffle(x.begin(), x.end(), mt);
	Color(1);
	--rem;
	for (int i = 0; i < rem; i++) Color(x[i % x.size()]);
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
