# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1003469 | ZeroCool | Examination (JOI19_examination) | C++14 | 3090 ms | 3420 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 int long long
//#define ll long long
#define ar array
#define ld long double
const int N = 2005;
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
signed main(){ios::sync_with_stdio(false);cin.tie(0);
int n, q;
cin>>n>>q;
ar<int, 2> A[n];
for(int i = 0;i < n;i++)cin>>A[i][0]>>A[i][1];
while(q--){
int a, b, c;
cin>>a>>b>>c;
int ans = 0;
for(int i = 0;i < n;i++){
if(A[i][0] >= a && A[i][1] >= b && (A[i][0] + A[i][1]) >= c)ans++;
}
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... |