Submission #66310171
Source Code Expand
//People who believe in miracles are as amazing as miracles themselves. #include<bits/stdc++.h> #define ll long long using namespace std; inline ll read(){ ll x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-') f=-f;ch=getchar();} while(ch>='0'&&ch<='9')x=(x<<3)+(x<<1)+(ch^48),ch=getchar(); return x*f; } const int N=1e6+10; int n,m,num[N]; inline void solve(){ n=read(),m=read(); for(int l,r;m;--m){ l=read(),r=read(),num[l]++,num[r+1]--; } for(int i=1;i<=n;++i) num[i]+=num[i-1]; printf("%d\n", *min_element(num+1,num+n+1) ); } signed main(){ #ifndef ONLINE_JUDGE freopen("../1.in","r",stdin); freopen("../1.out","w",stdout); #endif return solve(),0; }
Submission Info
Submission Time | |
---|---|
Task | C - Not All Covered |
User | include_BM |
Language | C++ 20 (gcc 12.2) |
Score | 300 |
Code Size | 766 Byte |
Status | AC |
Exec Time | 27 ms |
Memory | 7668 KiB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
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, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt, 01_test_14.txt, 01_test_15.txt, 01_test_16.txt, 01_test_17.txt, 01_test_18.txt, 01_test_19.txt, 01_test_20.txt, 01_test_21.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 1 ms | 3616 KiB |
00_sample_01.txt | AC | 1 ms | 3816 KiB |
00_sample_02.txt | AC | 1 ms | 3816 KiB |
01_test_00.txt | AC | 7 ms | 4228 KiB |
01_test_01.txt | AC | 9 ms | 3772 KiB |
01_test_02.txt | AC | 7 ms | 4116 KiB |
01_test_03.txt | AC | 7 ms | 3764 KiB |
01_test_04.txt | AC | 7 ms | 6680 KiB |
01_test_05.txt | AC | 13 ms | 5556 KiB |
01_test_06.txt | AC | 16 ms | 7644 KiB |
01_test_07.txt | AC | 19 ms | 7488 KiB |
01_test_08.txt | AC | 8 ms | 7528 KiB |
01_test_09.txt | AC | 21 ms | 7588 KiB |
01_test_10.txt | AC | 9 ms | 7500 KiB |
01_test_11.txt | AC | 19 ms | 7532 KiB |
01_test_12.txt | AC | 27 ms | 7668 KiB |
01_test_13.txt | AC | 26 ms | 7668 KiB |
01_test_14.txt | AC | 19 ms | 7600 KiB |
01_test_15.txt | AC | 20 ms | 7544 KiB |
01_test_16.txt | AC | 18 ms | 7488 KiB |
01_test_17.txt | AC | 19 ms | 7596 KiB |
01_test_18.txt | AC | 14 ms | 7528 KiB |
01_test_19.txt | AC | 10 ms | 7528 KiB |
01_test_20.txt | AC | 11 ms | 7648 KiB |
01_test_21.txt | AC | 10 ms | 7648 KiB |