This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |