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 <iostream>
#include <vector>
#include <map>
using namespace std;
map<string, int> used;
int k = 8;
vector<int> paint(int n) {
vector<int> squares = vector<int>(n+1, 1);
squares[n] = n;
k = 0;
string wind = "";
for (int i = 0; i < n; i++)
wind += "1";
used[wind] = 0;
return squares;
}
int find_location(int n, vector<int> c) {
for (int i = 0; i < (int) c.size(); i++) {
if (c[i] == -1)
return n - i;
}
if (k == 8)
paint(n);
string s = "";
for (int i = 0; i < (int) c.size(); i++)
s.push_back('0' + c[i]);
return used[s];
}
# | 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... |