제출 #733859

#제출 시각아이디문제언어결과실행 시간메모리
733859vjudge1Lightning Rod (NOI18_lightningrod)C++17
0 / 100
111 ms3580 KiB
#include <bits/stdc++.h> using namespace std; vector<pair<int,int>> v; const int mxn=2e5; long long sm,w; array <int,2> a[mxn]; int main() { long long n; cin>>n; for(int i=0; i<n; i++) { cin>>a[i][1]>>a[i][0]; } sort(a,a+n); for(int i=0; i<n; i++) { if(a[i][1]>=w) { sm++; w=a[i][0]; } } cout<<sm; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...