# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
674013 | sudheerays123 | Lightning Rod (NOI18_lightningrod) | C++17 | 1494 ms | 262144 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 fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define ll long long int
const ll N = 100+5 , INF = 1e18 , MOD = 1e9+7;
bool inside(ll x1 , ll y1 , ll x2 , ll y2){
return (abs(x2-x1) <= (y2-y1));
}
void solve(){
ll n;
cin >> n;
vector<pair<ll,ll>> a(n+5);
for(ll i = 1; i <= n; i++) cin >> a[i].first >> a[i].second;
vector<ll> left(n+5) , right(n+5);
for(ll i = 1; i <= n; i++){
for(ll j = i; j >= 1; j--){
if(inside(a[j].first,a[j].second,a[i].first,a[i].second)) left[i] = j;
else break;
}
}
for(ll i = 1; i <= n; i++){
for(ll j = i; j <= n; j++){
if(inside(a[j].first,a[j].second,a[i].first,a[i].second)) right[i] = j;
# | 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... |