답안 #643040

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
643040 2022-09-21T05:10:57 Z ymm Examination (JOI19_examination) C++17
100 / 100
2991 ms 6656 KB
#include <bits/stdc++.h>
#define Loop(x,l,r) for (ll x = (l); x < (r); ++x)
#define LoopR(x,l,r) for (ll x = (r)-1; x >= (l); --x)
typedef long long ll;
typedef std::pair<int, int> pii;
typedef std::pair<ll , ll > pll;
using namespace std;

#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx")

const int N = 100'010;
int a[N], b[N];
int n, q;

int main()
{
	cin.tie(0) -> sync_with_stdio(false);
	cin >> n >> q;
	Loop (i,0,n)
		cin >> a[i] >> b[i];
	Loop (i,0,q) {
		int x,y,z;
		cin >> x >> y >> z;
		int ans = 0;
		Loop (i,0,n) {
			int t1 = -(a[i]>=x);
			int t2 = -(b[i]>=y);
			int t3 = -(a[i]+b[i]>=z);
			ans -= t1 & t2 & t3;
		}
		cout << ans << '\n';
	}
}
# 결과 실행 시간 메모리 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 0 ms 212 KB Output is correct
7 Correct 6 ms 468 KB Output is correct
8 Correct 4 ms 448 KB Output is correct
9 Correct 4 ms 476 KB Output is correct
10 Correct 5 ms 468 KB Output is correct
11 Correct 4 ms 444 KB Output is correct
12 Correct 4 ms 340 KB Output is correct
13 Correct 5 ms 468 KB Output is correct
14 Correct 5 ms 448 KB Output is correct
15 Correct 5 ms 488 KB Output is correct
16 Correct 5 ms 340 KB Output is correct
17 Correct 5 ms 468 KB Output is correct
18 Correct 4 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2690 ms 4164 KB Output is correct
2 Correct 2922 ms 4204 KB Output is correct
3 Correct 2797 ms 4252 KB Output is correct
4 Correct 2692 ms 3488 KB Output is correct
5 Correct 2681 ms 3324 KB Output is correct
6 Correct 2744 ms 2668 KB Output is correct
7 Correct 2988 ms 4012 KB Output is correct
8 Correct 2958 ms 4060 KB Output is correct
9 Correct 2881 ms 4116 KB Output is correct
10 Correct 2774 ms 3280 KB Output is correct
11 Correct 2743 ms 3408 KB Output is correct
12 Correct 2843 ms 2216 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2690 ms 4164 KB Output is correct
2 Correct 2922 ms 4204 KB Output is correct
3 Correct 2797 ms 4252 KB Output is correct
4 Correct 2692 ms 3488 KB Output is correct
5 Correct 2681 ms 3324 KB Output is correct
6 Correct 2744 ms 2668 KB Output is correct
7 Correct 2988 ms 4012 KB Output is correct
8 Correct 2958 ms 4060 KB Output is correct
9 Correct 2881 ms 4116 KB Output is correct
10 Correct 2774 ms 3280 KB Output is correct
11 Correct 2743 ms 3408 KB Output is correct
12 Correct 2843 ms 2216 KB Output is correct
13 Correct 2793 ms 4852 KB Output is correct
14 Correct 2962 ms 4464 KB Output is correct
15 Correct 2737 ms 4224 KB Output is correct
16 Correct 2790 ms 3740 KB Output is correct
17 Correct 2816 ms 3756 KB Output is correct
18 Correct 2991 ms 2640 KB Output is correct
19 Correct 2801 ms 4560 KB Output is correct
20 Correct 2914 ms 4448 KB Output is correct
21 Correct 2817 ms 4572 KB Output is correct
22 Correct 2731 ms 3368 KB Output is correct
23 Correct 2748 ms 3296 KB Output is correct
24 Correct 2774 ms 2344 KB Output is correct
# 결과 실행 시간 메모리 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 0 ms 212 KB Output is correct
7 Correct 6 ms 468 KB Output is correct
8 Correct 4 ms 448 KB Output is correct
9 Correct 4 ms 476 KB Output is correct
10 Correct 5 ms 468 KB Output is correct
11 Correct 4 ms 444 KB Output is correct
12 Correct 4 ms 340 KB Output is correct
13 Correct 5 ms 468 KB Output is correct
14 Correct 5 ms 448 KB Output is correct
15 Correct 5 ms 488 KB Output is correct
16 Correct 5 ms 340 KB Output is correct
17 Correct 5 ms 468 KB Output is correct
18 Correct 4 ms 340 KB Output is correct
19 Correct 2690 ms 4164 KB Output is correct
20 Correct 2922 ms 4204 KB Output is correct
21 Correct 2797 ms 4252 KB Output is correct
22 Correct 2692 ms 3488 KB Output is correct
23 Correct 2681 ms 3324 KB Output is correct
24 Correct 2744 ms 2668 KB Output is correct
25 Correct 2988 ms 4012 KB Output is correct
26 Correct 2958 ms 4060 KB Output is correct
27 Correct 2881 ms 4116 KB Output is correct
28 Correct 2774 ms 3280 KB Output is correct
29 Correct 2743 ms 3408 KB Output is correct
30 Correct 2843 ms 2216 KB Output is correct
31 Correct 2793 ms 4852 KB Output is correct
32 Correct 2962 ms 4464 KB Output is correct
33 Correct 2737 ms 4224 KB Output is correct
34 Correct 2790 ms 3740 KB Output is correct
35 Correct 2816 ms 3756 KB Output is correct
36 Correct 2991 ms 2640 KB Output is correct
37 Correct 2801 ms 4560 KB Output is correct
38 Correct 2914 ms 4448 KB Output is correct
39 Correct 2817 ms 4572 KB Output is correct
40 Correct 2731 ms 3368 KB Output is correct
41 Correct 2748 ms 3296 KB Output is correct
42 Correct 2774 ms 2344 KB Output is correct
43 Correct 2905 ms 6444 KB Output is correct
44 Correct 2789 ms 6656 KB Output is correct
45 Correct 2719 ms 6500 KB Output is correct
46 Correct 2728 ms 5140 KB Output is correct
47 Correct 2654 ms 4944 KB Output is correct
48 Correct 2785 ms 2504 KB Output is correct
49 Correct 2877 ms 6612 KB Output is correct
50 Correct 2821 ms 6528 KB Output is correct
51 Correct 2636 ms 6312 KB Output is correct
52 Correct 2731 ms 5112 KB Output is correct
53 Correct 2611 ms 4112 KB Output is correct