Submission #1048328

#TimeUsernameProblemLanguageResultExecution timeMemory
1048328matereExamination (JOI19_examination)C++14
2 / 100
3058 ms1204 KiB
#include<bits/stdc++.h> using namespace std; int n,q,a[100005],b[100005]; int main(){ cin>>n>>q; for(int i=1;i<=n;i++){ cin>>a[i]>>b[i]; } int x,y,z; for(int i=1;i<=q;i++){ int ans=0; cin>>x>>y>>z; for(int j=1;j<=n;j++){ if(a[j]>=x and b[j]>=y and a[j]+b[j]>=z){ ans++; } } cout<<ans<<endl; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...