| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 741364 | josanneo22 | Painting Squares (IOI20_squares) | C++17 | 870 ms | 588 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;
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define fi first
#define se second
#include "squares.h"
#include <vector> 
vector<int> Init(int n){
	vector<int> ans;
    int k = 10;
	for (int i = 0; i < 10 && ans.size()<n; i++) ans.push_back(1);
	int v = (1 << k) - 1;
	vector<bool> kt(1 << k);
	kt[v] = true;
	while ((int)ans.size() < n) {
		v = (v << 1) % (1 << k);
		int sign = 0;
		if (kt[v]) {
			v++;
			sign = 1;
		}
		kt[v] = true;
		ans.push_back(sign);
	}
	return ans;
}
vector<int> paint(int n) {
	vector<int> labels=Init(n);
	labels.pb(10);
	return labels;
}
int find_location(int n, vector<int> c) {
	vector<int> ans=Init(n);
	for(int i=0;i<n;i++){
		vector<int> nw;
		for(int j=0;j<10;j++){
			if(i+j>=n) nw.pb(-1);
			else nw.pb(ans[i+j]);
		}
		if(nw==c) return i;
	}
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
