Submission #722477

# Submission time Handle Problem Language Result Execution time Memory
722477 2023-04-12T05:09:59 Z saayan007 Examination (JOI19_examination) C++17
2 / 100
3000 ms 3528 KB
#include "bits/stdc++.h"
using namespace std;

#define int long long
#define fr first
#define sc second
#define eb emplace_back
#define nl "\n"

signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n, q;
    cin >> n >> q;

    pair<int, int> s[n + 1];
    for(int i = 1; i <= n; ++i) cin >> s[i].fr >> s[i].sc;

    while(q--) {
        int ans = 0;
        int x, y, z;
        cin >> x >> y >> z;
        for(int i = 1; i <= n; ++i) {
            if(s[i].fr >= x && s[i].sc >= y && s[i].fr + s[i].sc >= z)
                ++ans;
        }
        cout << ans << nl;
    }
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 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 212 KB Output is correct
7 Correct 39 ms 508 KB Output is correct
8 Correct 39 ms 512 KB Output is correct
9 Correct 40 ms 468 KB Output is correct
10 Correct 43 ms 468 KB Output is correct
11 Correct 45 ms 464 KB Output is correct
12 Correct 41 ms 388 KB Output is correct
13 Correct 40 ms 488 KB Output is correct
14 Correct 39 ms 468 KB Output is correct
15 Correct 42 ms 488 KB Output is correct
16 Correct 18 ms 440 KB Output is correct
17 Correct 27 ms 460 KB Output is correct
18 Correct 8 ms 396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 3036 ms 3528 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 3036 ms 3528 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 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 212 KB Output is correct
7 Correct 39 ms 508 KB Output is correct
8 Correct 39 ms 512 KB Output is correct
9 Correct 40 ms 468 KB Output is correct
10 Correct 43 ms 468 KB Output is correct
11 Correct 45 ms 464 KB Output is correct
12 Correct 41 ms 388 KB Output is correct
13 Correct 40 ms 488 KB Output is correct
14 Correct 39 ms 468 KB Output is correct
15 Correct 42 ms 488 KB Output is correct
16 Correct 18 ms 440 KB Output is correct
17 Correct 27 ms 460 KB Output is correct
18 Correct 8 ms 396 KB Output is correct
19 Execution timed out 3036 ms 3528 KB Time limit exceeded
20 Halted 0 ms 0 KB -