이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pb push_back
#define pii pair<int, int>
#define MAX 1000000001
#define MOD 1000000007
#define INF 0x3F3F3F3F3F3F3F3F
#define OPT ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
int main()
{
OPT
int n, q;
cin >> n >> q;
ll math[n+1], info[n+1];
for(int i = 1; i<=n; i++)
cin >> math[i] >> info[i];
while(q--)
{
int a, b, c, k = 0;
cin >> a >> b >> c;
for(int i = 1; i<=n; i++)
{
if(math[i]>=a && info[i]>=b && math[i]+info[i]>=c)k++;
}
cout << k << 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... |