답안 #643044

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
643044 2022-09-21T05:15:50 Z ymm Examination (JOI19_examination) C++17
22 / 100
3000 ms 1804 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 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 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 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 468 KB Output is correct
12 Correct 4 ms 340 KB Output is correct
13 Correct 5 ms 340 KB Output is correct
14 Correct 5 ms 340 KB Output is correct
15 Correct 5 ms 340 KB Output is correct
16 Correct 4 ms 340 KB Output is correct
17 Correct 5 ms 340 KB Output is correct
18 Correct 4 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2570 ms 1560 KB Output is correct
2 Correct 2672 ms 1636 KB Output is correct
3 Correct 2634 ms 1688 KB Output is correct
4 Correct 2675 ms 1604 KB Output is correct
5 Correct 2717 ms 1612 KB Output is correct
6 Correct 2643 ms 1796 KB Output is correct
7 Correct 2646 ms 1672 KB Output is correct
8 Correct 2651 ms 1772 KB Output is correct
9 Correct 2814 ms 1632 KB Output is correct
10 Correct 2830 ms 1480 KB Output is correct
11 Correct 2675 ms 1804 KB Output is correct
12 Correct 2602 ms 1220 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2570 ms 1560 KB Output is correct
2 Correct 2672 ms 1636 KB Output is correct
3 Correct 2634 ms 1688 KB Output is correct
4 Correct 2675 ms 1604 KB Output is correct
5 Correct 2717 ms 1612 KB Output is correct
6 Correct 2643 ms 1796 KB Output is correct
7 Correct 2646 ms 1672 KB Output is correct
8 Correct 2651 ms 1772 KB Output is correct
9 Correct 2814 ms 1632 KB Output is correct
10 Correct 2830 ms 1480 KB Output is correct
11 Correct 2675 ms 1804 KB Output is correct
12 Correct 2602 ms 1220 KB Output is correct
13 Correct 2695 ms 1640 KB Output is correct
14 Correct 2793 ms 1696 KB Output is correct
15 Correct 2630 ms 1640 KB Output is correct
16 Correct 2708 ms 1708 KB Output is correct
17 Correct 2650 ms 1692 KB Output is correct
18 Correct 2641 ms 1620 KB Output is correct
19 Correct 2793 ms 1624 KB Output is correct
20 Execution timed out 3013 ms 1580 KB Time limit exceeded
21 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 0 ms 212 KB Output is correct
4 Correct 1 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 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 468 KB Output is correct
12 Correct 4 ms 340 KB Output is correct
13 Correct 5 ms 340 KB Output is correct
14 Correct 5 ms 340 KB Output is correct
15 Correct 5 ms 340 KB Output is correct
16 Correct 4 ms 340 KB Output is correct
17 Correct 5 ms 340 KB Output is correct
18 Correct 4 ms 340 KB Output is correct
19 Correct 2570 ms 1560 KB Output is correct
20 Correct 2672 ms 1636 KB Output is correct
21 Correct 2634 ms 1688 KB Output is correct
22 Correct 2675 ms 1604 KB Output is correct
23 Correct 2717 ms 1612 KB Output is correct
24 Correct 2643 ms 1796 KB Output is correct
25 Correct 2646 ms 1672 KB Output is correct
26 Correct 2651 ms 1772 KB Output is correct
27 Correct 2814 ms 1632 KB Output is correct
28 Correct 2830 ms 1480 KB Output is correct
29 Correct 2675 ms 1804 KB Output is correct
30 Correct 2602 ms 1220 KB Output is correct
31 Correct 2695 ms 1640 KB Output is correct
32 Correct 2793 ms 1696 KB Output is correct
33 Correct 2630 ms 1640 KB Output is correct
34 Correct 2708 ms 1708 KB Output is correct
35 Correct 2650 ms 1692 KB Output is correct
36 Correct 2641 ms 1620 KB Output is correct
37 Correct 2793 ms 1624 KB Output is correct
38 Execution timed out 3013 ms 1580 KB Time limit exceeded
39 Halted 0 ms 0 KB -