# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
625107 | QwertyPi | Land of the Rainbow Gold (APIO17_rainbow) | C++14 | 1236 ms | 92172 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 "rainbow.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N = 2e5 + 13;
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
int dir[256];
int bx1 = INT32_MAX, bx2 = INT32_MIN, by1 = INT32_MAX, by2 = INT32_MIN;
struct DS{
unordered_set<ll> S;
vector<int> bits[N];
string name;
DS(string _n) : name(_n){}
void add(int x, int y){
x++; y++;
if(S.count(x * N + y))
return;
S.insert(x * N + y);
for(int i = x; i < N; i += i & -i){
bits[i].push_back(y);
}
}
void load(){
for(int i = 0; i < N; i++){
sort(bits[i].begin(), bits[i].end());
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |