| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1302386 | pinbu | Advertisement 2 (JOI23_ho_t2) | C++20 | 113 ms | 4344 KiB |
#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
const long long oo = 1e18;
int n;
array<int, 2> a[N];
signed main(void) {
ios::sync_with_stdio(false); cin.tie(nullptr);
cin >> n;
for (int i = 1, x, e; i <= n; i++) {
cin >> x >> e;
a[i] = {x - e, -x - e};
}
sort(a + 1, a + 1 + n);
int ans = 0;
int mn = 2e9 + 1;
for (int i = 1; i <= n; i++) {
if (mn > a[i][1]) {
ans++;
mn = a[i][1];
}
}
cout << ans;
return 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... | ||||
