Submission #5448063
Source Code Expand
#include<iostream> #include<algorithm> #include<cmath> #include<vector> #include<string> #include<queue> #include<set> #include<map> using namespace std; typedef long long int ll; typedef vector<pair<ll,ll> > Q; typedef pair<int,int> P; #define rep(i,n) for(int i=0;i<(int)(n);i++) const ll inf=1e9+7; int n,m,s; int main(){ cin>>n>>m>>s; int l[m],r[m],p[s],q[s]; rep(i,m) cin>>l[i]>>r[i]; rep(i,s) cin>>p[i]>>q[i]; int d[n+1][n+1]; rep(i,n+1) rep(j,n+1) d[i][j]=0; rep(i,m){ for(int j=1;j<=l[i];j++) for(int k=r[i];k<=n;k++) d[j][k]++; } rep(i,s) cout<<d[p[i]][q[i]]<<endl; }
Submission Info
Submission Time | |
---|---|
Task | D - AtCoder Express 2 |
User | scotscotch |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 640 Byte |
Status | TLE |
Exec Time | 3155 ms |
Memory | 3712 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 400 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | in01.txt, in02.txt, in03.txt, in04.txt, in05.txt, in06.txt, in07.txt, in08.txt, in09.txt, in10.txt, sample_01.txt, sample_02.txt, sample_03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in01.txt | AC | 5 ms | 768 KB |
in02.txt | AC | 1 ms | 256 KB |
in03.txt | AC | 1 ms | 256 KB |
in04.txt | AC | 1 ms | 256 KB |
in05.txt | TLE | 3155 ms | 3584 KB |
in06.txt | TLE | 3155 ms | 3584 KB |
in07.txt | TLE | 3155 ms | 3584 KB |
in08.txt | TLE | 3155 ms | 3584 KB |
in09.txt | AC | 289 ms | 3712 KB |
in10.txt | TLE | 3155 ms | 3584 KB |
sample_01.txt | AC | 1 ms | 256 KB |
sample_02.txt | AC | 1 ms | 256 KB |
sample_03.txt | AC | 1 ms | 256 KB |