# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
971363 | andro | Examination (JOI19_examination) | C++14 | 3056 ms | 3672 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>.
#define int long long
using namespace std;
signed main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n, q;
cin >> n >> q;
vector<int> a(n + 1);
vector<int> b(n + 1);
for(int i = 1; i <= n; i++) {
int A, B;
cin >> A >> B;
a[i] = A;
b[i] = B;
}
while(q--) {
int x, y, z;
cin >> x >> y >> z;
int ans = 0;
for(int i = 1; i <= n; i++) {
if(a[i] >= x && b[i] >= y && a[i] + b[i] >= z) {
ans += 1;
}
}
cout << ans << "\n";
}
}
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... |