# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
759127 | Dan4Life | Advertisement 2 (JOI23_ho_t2) | C++17 | 329 ms | 4196 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 <bits/stdc++.h>
using namespace std;
main(){
int n,x,y;cin>>n;array<int,2>a[n];
for(int i=0;i<n;i++)cin>>x>>y,a[i]={x-y,-x-y};
sort(a,a+n);y=0;
for(int i=0;i<n;i++)if(x>a[i][1])x=a[i][1],y++;
cout<<y;
}
Compilation message (stderr)
# | 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... |