# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1131711 | lighton | Towers (NOI22_towers) | C++20 | 2100 ms | 205460 KiB |
#include <bits/stdc++.h>
#define pb push_back
#define all(v) v.begin(), v.end()
#define forf(i, s, e) for (int i = s; i <= e; i++)
#define forb(i, s, e) for (int i = s; i >= e; i--)
#define idx(i, v) (lower_bound(all(v), i) - v.begin())
#define comp(v) v.erase(unique(all(v)), v.end())
#define sz(v) (int)v.size()
#define fs first
#define se second
#define SP << " " <<
#define LN << "\n"
#define IO cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false);
using namespace std;
typedef long long ll;
ll inf = 1e18;
int N;
int X[1000001],Y[1000001];
set<pair<int,int> > xpos[1000001],ypos[1000001];
int ans[1000001];
bool chk(int i){
int flg = 0;
if(next(xpos[X[i]].find({Y[i],i})) == xpos[X[i]].end()) flg |= 1;
if(xpos[X[i]].find({Y[i],i}) == xpos[X[i]].begin()) flg |= 1;
if(next(ypos[Y[i]].find({X[i],i})) == ypos[Y[i]].end()) flg |= 2;
if(ypos[Y[i]].find({X[i],i}) == ypos[Y[i]].begin()) flg |= 2;
return (flg == 3);
}
void ers(int i, vector<int> &q){
# | 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... |