Submission #1130264

#TimeUsernameProblemLanguageResultExecution timeMemory
1130264AksLolCodingAdvertisement 2 (JOI23_ho_t2)C++20
100 / 100
135 ms4168 KiB
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; vector<array<int, 2>> a(n); for (auto &i: a) { int x, e; cin >> x >> e; i = {x-e, -(x+e)}; } // solve sort(begin(a), end(a)); int max = -1, cnt = 0; for (auto &i: a) if (max < -i[1]) max = -i[1], cnt++; // ans cout << cnt << '\n'; } signed main() { cin.tie(0)->sync_with_stdio(0); solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...