제출 #715431

#제출 시각아이디문제언어결과실행 시간메모리
715431AtabayRajabliExamination (JOI19_examination)C++11
2 / 100
3071 ms1308 KiB
#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()
{
    int n, q;
    cin >> n >> q;
    int 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...