# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
112054 | lauzm0 | Two Antennas (JOI19_antennas) | C++14 | 1353 ms | 524288 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 <iostream>
#include<vector>
#include<cmath>
using namespace std;
struct antenna {
int l; int r; long long h;
};
int main()
{
int n;
cin >> n;
vector<antenna> ant(n); vector<vector<int> >max(n,vector<int>(n,-1));
for (int i = 0; i < n; i++) {
cin >> ant[i].h >> ant[i].l >> ant[i].r;
}
for(int a = 0 ; a< n-1 ; a++){
int mxx = -1;
for(int b = a+1 ; b<n ; b++){
bool rangealeft = false; bool rangearight = false; bool rangebleft = false; bool rangebright = false;
if (a - ant[a].l >= b && a - ant[a].r <= b) {
rangealeft = true;
}
if (b - ant[b].l >= a && b - ant[b].r <= a) {
rangebleft = true;
}
# | 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... |