Submission #971363

# Submission time Handle Problem Language Result Execution time Memory
971363 2024-04-28T12:00:41 Z andro Examination (JOI19_examination) C++14
2 / 100
3000 ms 3672 KB
#include <bits/stdc++.h>.

#define int long long

using namespace std;

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, q;
    cin >> n >> q;
    vector<int> a(n + 1);
    vector<int> b(n + 1);
    for(int i = 1; i <= n; i++) {
        int A, B;
        cin >> A >> B;
        a[i] = A;
        b[i] = B;
    }
    while(q--) {
        int x, y, z;
        cin >> x >> y >> z;
        int ans = 0;
        for(int i = 1; i <= n; i++) {
            if(a[i] >= x && b[i] >= y && a[i] + b[i] >= z) {
                ans += 1;
            }
        }
        cout << ans << "\n";
    }
}

Compilation message

examination.cpp:1:25: warning: extra tokens at end of #include directive
    1 | #include <bits/stdc++.h>.
      |                         ^
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 456 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 40 ms 656 KB Output is correct
8 Correct 41 ms 848 KB Output is correct
9 Correct 38 ms 604 KB Output is correct
10 Correct 37 ms 604 KB Output is correct
11 Correct 38 ms 604 KB Output is correct
12 Correct 37 ms 348 KB Output is correct
13 Correct 37 ms 604 KB Output is correct
14 Correct 38 ms 604 KB Output is correct
15 Correct 39 ms 624 KB Output is correct
16 Correct 17 ms 348 KB Output is correct
17 Correct 27 ms 604 KB Output is correct
18 Correct 7 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 3056 ms 3672 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 3056 ms 3672 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 456 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 40 ms 656 KB Output is correct
8 Correct 41 ms 848 KB Output is correct
9 Correct 38 ms 604 KB Output is correct
10 Correct 37 ms 604 KB Output is correct
11 Correct 38 ms 604 KB Output is correct
12 Correct 37 ms 348 KB Output is correct
13 Correct 37 ms 604 KB Output is correct
14 Correct 38 ms 604 KB Output is correct
15 Correct 39 ms 624 KB Output is correct
16 Correct 17 ms 348 KB Output is correct
17 Correct 27 ms 604 KB Output is correct
18 Correct 7 ms 344 KB Output is correct
19 Execution timed out 3056 ms 3672 KB Time limit exceeded
20 Halted 0 ms 0 KB -