답안 #788807

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
788807 2023-07-20T16:04:22 Z tch1cherin Examination (JOI19_examination) C++17
100 / 100
2609 ms 3952 KB
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx")
#include <bits/stdc++.h>
using namespace std;

const int MAX_N = 1e5 + 5;
int S[MAX_N], T[MAX_N];

int main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  int N, Q;
  cin >> N >> Q;
  for (int i = 0; i < N; i++) {
    cin >> S[i] >> T[i];
  }
  for (int i = 0; i < Q; i++) {
    int x, y, z;
    cin >> x >> y >> z;
    int ans = 0;
    for (int j = 0; j < N; j++) {
      ans += S[j] >= x && T[j] >= y && S[j] + T[j] >= z;  
    }
    cout << ans << "\n";
  }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 340 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 6 ms 596 KB Output is correct
8 Correct 4 ms 472 KB Output is correct
9 Correct 4 ms 452 KB Output is correct
10 Correct 4 ms 472 KB Output is correct
11 Correct 4 ms 444 KB Output is correct
12 Correct 3 ms 340 KB Output is correct
13 Correct 4 ms 468 KB Output is correct
14 Correct 4 ms 468 KB Output is correct
15 Correct 4 ms 448 KB Output is correct
16 Correct 4 ms 340 KB Output is correct
17 Correct 4 ms 340 KB Output is correct
18 Correct 3 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2513 ms 3868 KB Output is correct
2 Correct 2414 ms 3952 KB Output is correct
3 Correct 2609 ms 3700 KB Output is correct
4 Correct 2451 ms 3344 KB Output is correct
5 Correct 2504 ms 3416 KB Output is correct
6 Correct 2585 ms 2676 KB Output is correct
7 Correct 2474 ms 3616 KB Output is correct
8 Correct 2380 ms 3688 KB Output is correct
9 Correct 2516 ms 3636 KB Output is correct
10 Correct 2382 ms 3124 KB Output is correct
11 Correct 2420 ms 3216 KB Output is correct
12 Correct 2438 ms 2288 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2513 ms 3868 KB Output is correct
2 Correct 2414 ms 3952 KB Output is correct
3 Correct 2609 ms 3700 KB Output is correct
4 Correct 2451 ms 3344 KB Output is correct
5 Correct 2504 ms 3416 KB Output is correct
6 Correct 2585 ms 2676 KB Output is correct
7 Correct 2474 ms 3616 KB Output is correct
8 Correct 2380 ms 3688 KB Output is correct
9 Correct 2516 ms 3636 KB Output is correct
10 Correct 2382 ms 3124 KB Output is correct
11 Correct 2420 ms 3216 KB Output is correct
12 Correct 2438 ms 2288 KB Output is correct
13 Correct 2396 ms 3544 KB Output is correct
14 Correct 2433 ms 3556 KB Output is correct
15 Correct 2481 ms 3548 KB Output is correct
16 Correct 2400 ms 3488 KB Output is correct
17 Correct 2470 ms 3468 KB Output is correct
18 Correct 2388 ms 2740 KB Output is correct
19 Correct 2390 ms 3528 KB Output is correct
20 Correct 2404 ms 3564 KB Output is correct
21 Correct 2421 ms 3524 KB Output is correct
22 Correct 2512 ms 3220 KB Output is correct
23 Correct 2491 ms 3212 KB Output is correct
24 Correct 2447 ms 2272 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 340 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 6 ms 596 KB Output is correct
8 Correct 4 ms 472 KB Output is correct
9 Correct 4 ms 452 KB Output is correct
10 Correct 4 ms 472 KB Output is correct
11 Correct 4 ms 444 KB Output is correct
12 Correct 3 ms 340 KB Output is correct
13 Correct 4 ms 468 KB Output is correct
14 Correct 4 ms 468 KB Output is correct
15 Correct 4 ms 448 KB Output is correct
16 Correct 4 ms 340 KB Output is correct
17 Correct 4 ms 340 KB Output is correct
18 Correct 3 ms 340 KB Output is correct
19 Correct 2513 ms 3868 KB Output is correct
20 Correct 2414 ms 3952 KB Output is correct
21 Correct 2609 ms 3700 KB Output is correct
22 Correct 2451 ms 3344 KB Output is correct
23 Correct 2504 ms 3416 KB Output is correct
24 Correct 2585 ms 2676 KB Output is correct
25 Correct 2474 ms 3616 KB Output is correct
26 Correct 2380 ms 3688 KB Output is correct
27 Correct 2516 ms 3636 KB Output is correct
28 Correct 2382 ms 3124 KB Output is correct
29 Correct 2420 ms 3216 KB Output is correct
30 Correct 2438 ms 2288 KB Output is correct
31 Correct 2396 ms 3544 KB Output is correct
32 Correct 2433 ms 3556 KB Output is correct
33 Correct 2481 ms 3548 KB Output is correct
34 Correct 2400 ms 3488 KB Output is correct
35 Correct 2470 ms 3468 KB Output is correct
36 Correct 2388 ms 2740 KB Output is correct
37 Correct 2390 ms 3528 KB Output is correct
38 Correct 2404 ms 3564 KB Output is correct
39 Correct 2421 ms 3524 KB Output is correct
40 Correct 2512 ms 3220 KB Output is correct
41 Correct 2491 ms 3212 KB Output is correct
42 Correct 2447 ms 2272 KB Output is correct
43 Correct 2539 ms 3536 KB Output is correct
44 Correct 2459 ms 3532 KB Output is correct
45 Correct 2536 ms 3508 KB Output is correct
46 Correct 2473 ms 3556 KB Output is correct
47 Correct 2508 ms 3576 KB Output is correct
48 Correct 2465 ms 2512 KB Output is correct
49 Correct 2496 ms 3584 KB Output is correct
50 Correct 2443 ms 3552 KB Output is correct
51 Correct 2393 ms 3716 KB Output is correct
52 Correct 2405 ms 3496 KB Output is correct
53 Correct 2388 ms 3480 KB Output is correct