# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
949824 | esomer | Towers (NOI22_towers) | C++17 | 848 ms | 179776 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;
const int maxX = 1e6;
vector<int> cols[maxX + 1], rows[maxX + 1];
vector<bool> chosen[maxX + 1];
int ind[maxX + 1];
bool choose(int X, int Y){
int lo = 0;
int hi = (int)cols[X].size() - 1;
int bst = -1;
while(lo <= hi){
int mid = (lo + hi) / 2;
if(cols[X][mid] >= Y){
bst = mid;
hi = mid - 1;
}else lo = mid + 1;
}
if(chosen[X][bst]) return true;
chosen[X][bst] = true;
return false;
}
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |