# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
899356 | stefanneagu | Advertisement 2 (JOI23_ho_t2) | C++17 | 364 ms | 14048 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,i;array<int,2>v[500001];cin>>n;for(i=0;i<n;i++)cin>>x>>y,v[i]={x-y,-x-y};sort(v,v+n);x=y=0;for(i=0;i<n;i++)if(y>v[i][1])y=v[i][1],x++;cout<<x;}
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... |