답안 #649948

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
649948 2022-10-11T16:25:49 Z kakayoshi Examination (JOI19_examination) C++17
22 / 100
3000 ms 4628 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 0 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 4 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 5 ms 340 KB Output is correct
12 Correct 6 ms 356 KB Output is correct
13 Correct 5 ms 340 KB Output is correct
14 Correct 4 ms 372 KB Output is correct
15 Correct 6 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 Correct 2757 ms 1664 KB Output is correct
2 Correct 2894 ms 1700 KB Output is correct
3 Correct 2914 ms 1608 KB Output is correct
4 Correct 2772 ms 1664 KB Output is correct
5 Correct 2784 ms 1812 KB Output is correct
6 Correct 2933 ms 1704 KB Output is correct
7 Correct 2710 ms 1828 KB Output is correct
8 Correct 2681 ms 1680 KB Output is correct
9 Correct 2673 ms 1568 KB Output is correct
10 Correct 2806 ms 1548 KB Output is correct
11 Correct 2966 ms 1448 KB Output is correct
12 Correct 2929 ms 2360 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2757 ms 1664 KB Output is correct
2 Correct 2894 ms 1700 KB Output is correct
3 Correct 2914 ms 1608 KB Output is correct
4 Correct 2772 ms 1664 KB Output is correct
5 Correct 2784 ms 1812 KB Output is correct
6 Correct 2933 ms 1704 KB Output is correct
7 Correct 2710 ms 1828 KB Output is correct
8 Correct 2681 ms 1680 KB Output is correct
9 Correct 2673 ms 1568 KB Output is correct
10 Correct 2806 ms 1548 KB Output is correct
11 Correct 2966 ms 1448 KB Output is correct
12 Correct 2929 ms 2360 KB Output is correct
13 Correct 2845 ms 4576 KB Output is correct
14 Correct 2752 ms 4528 KB Output is correct
15 Correct 2788 ms 4388 KB Output is correct
16 Correct 2762 ms 3788 KB Output is correct
17 Correct 2759 ms 4092 KB Output is correct
18 Correct 2731 ms 2656 KB Output is correct
19 Correct 2729 ms 4628 KB Output is correct
20 Correct 2928 ms 4500 KB Output is correct
21 Execution timed out 3067 ms 4556 KB Time limit exceeded
22 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 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 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 4 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 5 ms 340 KB Output is correct
12 Correct 6 ms 356 KB Output is correct
13 Correct 5 ms 340 KB Output is correct
14 Correct 4 ms 372 KB Output is correct
15 Correct 6 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 Correct 2757 ms 1664 KB Output is correct
20 Correct 2894 ms 1700 KB Output is correct
21 Correct 2914 ms 1608 KB Output is correct
22 Correct 2772 ms 1664 KB Output is correct
23 Correct 2784 ms 1812 KB Output is correct
24 Correct 2933 ms 1704 KB Output is correct
25 Correct 2710 ms 1828 KB Output is correct
26 Correct 2681 ms 1680 KB Output is correct
27 Correct 2673 ms 1568 KB Output is correct
28 Correct 2806 ms 1548 KB Output is correct
29 Correct 2966 ms 1448 KB Output is correct
30 Correct 2929 ms 2360 KB Output is correct
31 Correct 2845 ms 4576 KB Output is correct
32 Correct 2752 ms 4528 KB Output is correct
33 Correct 2788 ms 4388 KB Output is correct
34 Correct 2762 ms 3788 KB Output is correct
35 Correct 2759 ms 4092 KB Output is correct
36 Correct 2731 ms 2656 KB Output is correct
37 Correct 2729 ms 4628 KB Output is correct
38 Correct 2928 ms 4500 KB Output is correct
39 Execution timed out 3067 ms 4556 KB Time limit exceeded
40 Halted 0 ms 0 KB -