# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1149618 | henriess | Advertisement 2 (JOI23_ho_t2) | C++20 | 146 ms | 23948 KiB |
#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<long long,long long> p1,pair<long long,long long> p2){
if (p1.first == p2.first){
return p1.second > p2.second;
}
return p1.first < p2.first;
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
long long n;cin>>n;
vector<long long>X(n);
vector<long long> E(n);
vector<pair<long long,long long>> residents(n);
for(int i = 0;i<n;i++){
cin >> X[i];
cin >> E[i];
residents[i].first = X[i];
residents[i].second = E[i];
}
vector<pair<long long,long long>> points(n);
//do the bloody algebra
//I hate my life
for(int i = 0;i<n;i++){
points[i] = {residents[i].first-residents[i].second,residents[i].first + residents[i].second};
# | 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... |