| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 802948 | aymanrs | Advertisement 2 (JOI23_ho_t2) | C++14 | 120 ms | 14032 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
const int MOD = 1e9+7;
using namespace std;
void solve(){
vector<pair<int, int>> v;
int n, x, e;
cin >> n;
while(n--){
cin >> x >> e;
v.emplace_back(e+x, e-x);
}
sort(v.begin(), v.end());
int ans = 0;
while(!v.empty()){
ans++;
e = v.back().second;
v.pop_back();
while(!v.empty() && v.back().second <= e) v.pop_back();
}
cout << ans << '\n';
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
solve();
}| # | 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... | ||||
