Submission #715177

# Submission time Handle Problem Language Result Execution time Memory
715177 2023-03-26T07:14:55 Z murad_2005 Examination (JOI19_examination) C++14
2 / 100
3000 ms 1100 KB
#include<bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define piii pair<int, pii>
#define pllll pair<ll, ll>
#define plli pair<ll, int>
#define vi vector<int>
#define vvi vector<vector<int>>
#define pb push_back
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define size(v) v.size()
#define INF 1e9
#define f first
#define s second
#define ln "\n"

using namespace std;



void solve(){
    int n, q;
    cin >> n >> q;
    vector<pii>p(n + 1);
    for(int i = 1; i <= n; ++i){
        cin >> p[i].f >> p[i].s;
    }
    while(q--){
        int x, y, z;
        cin >> x >> y >> z;
        int cnt = 0;
        for(int i = 1; i <= n; i++){
            if(p[i].f >= x && p[i].s >= y && p[i].f + p[i].s >= z){
                cnt++;
            }
        }
        cout << cnt << "\n";
    }
}

int main(){
    int t;
    t = 1;
    // cin >> t;
    while(t--){
        solve();
    }
    return 0;
}

# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 300 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 300 KB Output is correct
7 Correct 64 ms 468 KB Output is correct
8 Correct 53 ms 468 KB Output is correct
9 Correct 51 ms 436 KB Output is correct
10 Correct 50 ms 340 KB Output is correct
11 Correct 57 ms 412 KB Output is correct
12 Correct 50 ms 356 KB Output is correct
13 Correct 54 ms 432 KB Output is correct
14 Correct 56 ms 436 KB Output is correct
15 Correct 54 ms 448 KB Output is correct
16 Correct 27 ms 404 KB Output is correct
17 Correct 38 ms 420 KB Output is correct
18 Correct 18 ms 360 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 3070 ms 1100 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 3070 ms 1100 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 300 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 300 KB Output is correct
7 Correct 64 ms 468 KB Output is correct
8 Correct 53 ms 468 KB Output is correct
9 Correct 51 ms 436 KB Output is correct
10 Correct 50 ms 340 KB Output is correct
11 Correct 57 ms 412 KB Output is correct
12 Correct 50 ms 356 KB Output is correct
13 Correct 54 ms 432 KB Output is correct
14 Correct 56 ms 436 KB Output is correct
15 Correct 54 ms 448 KB Output is correct
16 Correct 27 ms 404 KB Output is correct
17 Correct 38 ms 420 KB Output is correct
18 Correct 18 ms 360 KB Output is correct
19 Execution timed out 3070 ms 1100 KB Time limit exceeded
20 Halted 0 ms 0 KB -