Submission #67510127


Source Code Expand

#include<bits/stdc++.h>
using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define INF 0x7fffffff
#define inf 0x3f3f3f3f
#define endl '\n'
#define int long long
#define PII pair<int,int>
#define mod 998244353
const int MOD=1e9+7;
const int N=1e5+10;
int read() {char act = 0;int f = 1, x= 0;while (act = getchar(), act < '0' && act != '-');if (act == '-') f = -1, act = getchar();x = act - '0';while (act = getchar(), act >= '0') x = x * 10 + act - '0';return x * f;}
void solve(){
    int n,start,end;
    cin>>n>>start>>end;
    int ans=0;
    for(int i=1;i<=n;i++){
        int a,b;
        cin>>a>>b;
        if(a<=start&&b>=end){
            ans++;
        }
    }
    cout<<ans<<endl;
}
signed main()
{
    IOS;
    int t=1;
    //cin>>t;
    while(t--){
        solve();
    }

    return 0;
}

Submission Info

Submission Time
Task A - Streamer Takahashi
User Freakkk
Language C++ 20 (gcc 12.2)
Score 100
Code Size 867 Byte
Status AC
Exec Time 1 ms
Memory 3600 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 13
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_test_00.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3516 KiB
00_sample_01.txt AC 1 ms 3440 KiB
00_sample_02.txt AC 1 ms 3412 KiB
01_test_00.txt AC 1 ms 3596 KiB
01_test_01.txt AC 1 ms 3516 KiB
01_test_02.txt AC 1 ms 3600 KiB
01_test_03.txt AC 1 ms 3320 KiB
01_test_04.txt AC 1 ms 3592 KiB
01_test_05.txt AC 1 ms 3460 KiB
01_test_06.txt AC 1 ms 3456 KiB
01_test_07.txt AC 1 ms 3408 KiB
01_test_08.txt AC 1 ms 3428 KiB
01_test_09.txt AC 1 ms 3464 KiB