Submission #76627805


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
#include "atcoder/all"
using namespace atcoder;
#define rep(i, n) for (int i = 0; i < (n); ++i)
//using mint=modint998244353;
void solve(){
    int n,mi=1e7,ans=0;
    cin>>n;
    vector<pair<int,int>>a(n);
    rep(i,n)cin>>a[i].first>>a[i].second;
    sort(a.begin(),a.end());
    rep(i,n){
        if(mi>a[i].second){
            ans++;
            mi=a[i].second;
        }
    }
    cout<<ans;
}
int main(){
    ios::sync_with_stdio(false);
	cin.tie(nullptr);
    int t=1;
    //cin>>t;
    while(t--)solve();
}

Submission Info

Submission Time
Task C - Not Covered Points
User itoito1234
Language C++23 (GCC 15.2.0)
Score 300
Code Size 587 Byte
Status AC
Exec Time 41 ms
Memory 5724 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 25
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3428 KiB
00_sample_01.txt AC 1 ms 3308 KiB
00_sample_02.txt AC 1 ms 3504 KiB
01_random_00.txt AC 1 ms 3484 KiB
01_random_01.txt AC 22 ms 5648 KiB
01_random_02.txt AC 39 ms 5556 KiB
01_random_03.txt AC 22 ms 5600 KiB
01_random_04.txt AC 40 ms 5612 KiB
01_random_05.txt AC 27 ms 4788 KiB
01_random_06.txt AC 40 ms 5688 KiB
01_random_07.txt AC 22 ms 4696 KiB
01_random_08.txt AC 40 ms 5648 KiB
01_random_09.txt AC 24 ms 4664 KiB
01_random_10.txt AC 40 ms 5724 KiB
01_random_11.txt AC 12 ms 3972 KiB
01_random_12.txt AC 40 ms 5724 KiB
01_random_13.txt AC 40 ms 5556 KiB
01_random_14.txt AC 39 ms 5556 KiB
01_random_15.txt AC 40 ms 5676 KiB
01_random_16.txt AC 40 ms 5648 KiB
01_random_17.txt AC 40 ms 5576 KiB
01_random_18.txt AC 40 ms 5572 KiB
01_random_19.txt AC 40 ms 5628 KiB
01_random_20.txt AC 41 ms 5680 KiB
01_random_21.txt AC 38 ms 5560 KiB