# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
28642 | 뚜룹뚜룹뚜룹뚜스~>< (#68) | 1-Color Coloring (FXCUP2_coloring) | C++11 | 0 ms | 1124 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 <cstdio>
#include <algorithm>
using namespace std;
int arr[110];
void ColoringSame(int n){
int i, j, flag, l, r, mid, now = 1;
for(i = 1; i < min(25, n - 1); i++){
l = 1; r = n;
while(l <= r){
mid = (l + r) / 2;
for(j = l; j <= mid; j++){
if(arr[j] || j == 1) continue;
Color(j);
}
flag = GetColor(now);
if(flag) l = mid + 1;
else r = mid - 1;
}
arr[l] = now; now = l;
}
for(i = 1; i < 77; i++){
Color(1);
for(j = 2; j <= n; j++){
if(arr[j]) continue;
Color(j);
}
}
while(now != 1) Color(now), now = arr[now];
return;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |