답안 #772968

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
772968 2023-07-04T13:33:26 Z Blagoj Examination (JOI19_examination) C++17
2 / 100
3000 ms 2504 KB
#include <bits/stdc++.h>

#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 42
#endif

#pragma GCC optimize("Ofast,unroll-loops")

using namespace std;

#define endl '\n'
#define ll long long
#define all(x) x.begin(), x.end()

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n, q;
    cin >> n >> q;
    int a[n], b[n];
    for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
    while (q--) {
        int x, y, z, ans = 0;
        cin >> x >> y >> z;
        for (int i = 0; i < n; i++) ans += (a[i] >= x & b[i] >= y & a[i] + b[i] >= z);
        cout << ans << endl;
    }
}

Compilation message

examination.cpp: In function 'int main()':
examination.cpp:27:50: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   27 |         for (int i = 0; i < n; i++) ans += (a[i] >= x & b[i] >= y & a[i] + b[i] >= z);
      |                                             ~~~~~^~~~
examination.cpp:27:81: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   27 |         for (int i = 0; i < n; i++) ans += (a[i] >= x & b[i] >= y & a[i] + b[i] >= z);
      |                                                                     ~~~~~~~~~~~~^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 5 ms 340 KB Output is correct
8 Correct 5 ms 340 KB Output is correct
9 Correct 4 ms 340 KB Output is correct
10 Correct 4 ms 340 KB Output is correct
11 Correct 4 ms 340 KB Output is correct
12 Correct 4 ms 340 KB Output is correct
13 Correct 4 ms 340 KB Output is correct
14 Correct 4 ms 340 KB Output is correct
15 Correct 4 ms 340 KB Output is correct
16 Correct 4 ms 340 KB Output is correct
17 Correct 4 ms 340 KB Output is correct
18 Correct 4 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3055 ms 2504 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3055 ms 2504 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 5 ms 340 KB Output is correct
8 Correct 5 ms 340 KB Output is correct
9 Correct 4 ms 340 KB Output is correct
10 Correct 4 ms 340 KB Output is correct
11 Correct 4 ms 340 KB Output is correct
12 Correct 4 ms 340 KB Output is correct
13 Correct 4 ms 340 KB Output is correct
14 Correct 4 ms 340 KB Output is correct
15 Correct 4 ms 340 KB Output is correct
16 Correct 4 ms 340 KB Output is correct
17 Correct 4 ms 340 KB Output is correct
18 Correct 4 ms 340 KB Output is correct
19 Execution timed out 3055 ms 2504 KB Time limit exceeded
20 Halted 0 ms 0 KB -