# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
998238 | cowwycow | Examination (JOI19_examination) | C++14 | 3039 ms | 3548 KiB |
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;
#define name "aaaaaa"
using ll = long long;
using pii = pair<ll, ll>;
void file(){
ios_base::sync_with_stdio(0); cin.tie(0);
if(fopen(name".inp", "r")) {
freopen(name".inp", "r", stdin);
freopen("checkcode.out", "w", stdout);
}
}
const int maxn = 3e5 + 5;
pair<int, int> a[maxn];
void solve (){
int n, q;
cin >> n >> q;
for(int i = 1; i <= n; i++){
cin >> a[i].first >> a[i].second;
}
while(q--){
int x, y, z;
cin >> x >> y >> z;
int ct = 0;
for(int i = 1; i <= n; i++){
if(a[i].first >= x && a[i].second >= y && a[i].first + a[i].second >= z) ct++;
}
cout << ct << endl;
}
}
int main(){
file();
solve();
}
Compilation message (stderr)
# | 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... |