제출 #759127

#제출 시각아이디문제언어결과실행 시간메모리
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; }

컴파일 시 표준 에러 (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...