답안 #926046

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
926046 2024-02-12T13:33:56 Z Erfan1386Y Examination (JOI19_examination) C++17
100 / 100
1619 ms 6864 KB
#include <bits/stdc++.h>
#pragma GCC target ("avx2")
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#define file_io freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#define fast_io ios::sync_with_stdio(false);cin.tie(0);
#define what(x) cerr << #x << " is " << x << '\n';
#define kill(x) {cout << x << '\n'; continue;}
#define all(x) (x).begin(), (x).end()
#define pii pair<int, int>
#define pb push_back
#define ll long long
#define F first
#define S second
const ll inf = 1e18, mod = 1e9 + 7, delta = 1e9 + 9, SQ = 450, P = 6065621;

using namespace std;

const ll N = 1e5 + 10, LG = 20;
int s[N], t[N];

int main() {
  fast_io;
  int n, q;
  cin >> n >> q;
  for (int i = 1; i <= n; i++) 
    cin >> s[i] >> t[i];
  while (q--) {
    int ans = 0, x, y, z;
    cin >> x >> y >> z;
    for (int i = 1; i <= n; i++)
      ans += (s[i] >= x && t[i] >= y && s[i] + t[i] >= z);
    cout << ans << '\n';
  }
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 3 ms 600 KB Output is correct
8 Correct 3 ms 604 KB Output is correct
9 Correct 3 ms 604 KB Output is correct
10 Correct 3 ms 604 KB Output is correct
11 Correct 3 ms 600 KB Output is correct
12 Correct 4 ms 344 KB Output is correct
13 Correct 3 ms 600 KB Output is correct
14 Correct 5 ms 600 KB Output is correct
15 Correct 3 ms 600 KB Output is correct
16 Correct 3 ms 344 KB Output is correct
17 Correct 3 ms 604 KB Output is correct
18 Correct 3 ms 528 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1552 ms 4268 KB Output is correct
2 Correct 1544 ms 4168 KB Output is correct
3 Correct 1483 ms 4472 KB Output is correct
4 Correct 1472 ms 3532 KB Output is correct
5 Correct 1505 ms 3744 KB Output is correct
6 Correct 1486 ms 2620 KB Output is correct
7 Correct 1573 ms 4156 KB Output is correct
8 Correct 1558 ms 4208 KB Output is correct
9 Correct 1619 ms 4036 KB Output is correct
10 Correct 1498 ms 3272 KB Output is correct
11 Correct 1520 ms 3164 KB Output is correct
12 Correct 1448 ms 2420 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1552 ms 4268 KB Output is correct
2 Correct 1544 ms 4168 KB Output is correct
3 Correct 1483 ms 4472 KB Output is correct
4 Correct 1472 ms 3532 KB Output is correct
5 Correct 1505 ms 3744 KB Output is correct
6 Correct 1486 ms 2620 KB Output is correct
7 Correct 1573 ms 4156 KB Output is correct
8 Correct 1558 ms 4208 KB Output is correct
9 Correct 1619 ms 4036 KB Output is correct
10 Correct 1498 ms 3272 KB Output is correct
11 Correct 1520 ms 3164 KB Output is correct
12 Correct 1448 ms 2420 KB Output is correct
13 Correct 1478 ms 4692 KB Output is correct
14 Correct 1548 ms 4596 KB Output is correct
15 Correct 1597 ms 4200 KB Output is correct
16 Correct 1466 ms 4140 KB Output is correct
17 Correct 1557 ms 3864 KB Output is correct
18 Correct 1618 ms 2816 KB Output is correct
19 Correct 1548 ms 4692 KB Output is correct
20 Correct 1508 ms 4928 KB Output is correct
21 Correct 1542 ms 4692 KB Output is correct
22 Correct 1501 ms 3300 KB Output is correct
23 Correct 1532 ms 3396 KB Output is correct
24 Correct 1505 ms 2320 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 3 ms 600 KB Output is correct
8 Correct 3 ms 604 KB Output is correct
9 Correct 3 ms 604 KB Output is correct
10 Correct 3 ms 604 KB Output is correct
11 Correct 3 ms 600 KB Output is correct
12 Correct 4 ms 344 KB Output is correct
13 Correct 3 ms 600 KB Output is correct
14 Correct 5 ms 600 KB Output is correct
15 Correct 3 ms 600 KB Output is correct
16 Correct 3 ms 344 KB Output is correct
17 Correct 3 ms 604 KB Output is correct
18 Correct 3 ms 528 KB Output is correct
19 Correct 1552 ms 4268 KB Output is correct
20 Correct 1544 ms 4168 KB Output is correct
21 Correct 1483 ms 4472 KB Output is correct
22 Correct 1472 ms 3532 KB Output is correct
23 Correct 1505 ms 3744 KB Output is correct
24 Correct 1486 ms 2620 KB Output is correct
25 Correct 1573 ms 4156 KB Output is correct
26 Correct 1558 ms 4208 KB Output is correct
27 Correct 1619 ms 4036 KB Output is correct
28 Correct 1498 ms 3272 KB Output is correct
29 Correct 1520 ms 3164 KB Output is correct
30 Correct 1448 ms 2420 KB Output is correct
31 Correct 1478 ms 4692 KB Output is correct
32 Correct 1548 ms 4596 KB Output is correct
33 Correct 1597 ms 4200 KB Output is correct
34 Correct 1466 ms 4140 KB Output is correct
35 Correct 1557 ms 3864 KB Output is correct
36 Correct 1618 ms 2816 KB Output is correct
37 Correct 1548 ms 4692 KB Output is correct
38 Correct 1508 ms 4928 KB Output is correct
39 Correct 1542 ms 4692 KB Output is correct
40 Correct 1501 ms 3300 KB Output is correct
41 Correct 1532 ms 3396 KB Output is correct
42 Correct 1505 ms 2320 KB Output is correct
43 Correct 1496 ms 6864 KB Output is correct
44 Correct 1498 ms 6652 KB Output is correct
45 Correct 1493 ms 6748 KB Output is correct
46 Correct 1473 ms 4952 KB Output is correct
47 Correct 1576 ms 5244 KB Output is correct
48 Correct 1489 ms 2788 KB Output is correct
49 Correct 1513 ms 6484 KB Output is correct
50 Correct 1547 ms 6676 KB Output is correct
51 Correct 1493 ms 6356 KB Output is correct
52 Correct 1579 ms 4816 KB Output is correct
53 Correct 1539 ms 4532 KB Output is correct