Submission #759127

#TimeUsernameProblemLanguageResultExecution timeMemory
759127Dan4LifeAdvertisement 2 (JOI23_ho_t2)C++17
100 / 100
329 ms4196 KiB
#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)

Main.cpp:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...