답안 #728005

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
728005 2023-04-21T19:02:10 Z aykhn Examination (JOI19_examination) C++14
100 / 100
2902 ms 6544 KB
#include<iostream>
using namespace std;
#pragma GCC target ("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
const int N = 100'001;
int n, q, ans;
int x, y, z;
int s[N], t[N];
int i;
int main () {
	scanf("%d %d", &n, &q);
	for(i = 0;i<n;i++) {
		scanf("%d %d", &s[i], &t[i]);
	}
	while(q--) {
		ans=0;
		scanf("%d %d %d", &x, &y, &z);
		for(i = 0;i<n;i++) {
      int ff=(s[i]>=x);
      int ss=(t[i]>=y);
      int tt=(s[i]+t[i]>=z);
      ans+=ff&ss&tt;
		}
		printf("%d\n", ans);
	}
}
 

Compilation message

examination.cpp: In function 'int main()':
examination.cpp:12:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |  scanf("%d %d", &n, &q);
      |  ~~~~~^~~~~~~~~~~~~~~~~
examination.cpp:14:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |   scanf("%d %d", &s[i], &t[i]);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
examination.cpp:18:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   18 |   scanf("%d %d %d", &x, &y, &z);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 5 ms 488 KB Output is correct
8 Correct 5 ms 488 KB Output is correct
9 Correct 5 ms 452 KB Output is correct
10 Correct 4 ms 340 KB Output is correct
11 Correct 4 ms 340 KB Output is correct
12 Correct 5 ms 376 KB Output is correct
13 Correct 5 ms 452 KB Output is correct
14 Correct 5 ms 468 KB Output is correct
15 Correct 5 ms 468 KB Output is correct
16 Correct 5 ms 328 KB Output is correct
17 Correct 5 ms 468 KB Output is correct
18 Correct 4 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2575 ms 4256 KB Output is correct
2 Correct 2744 ms 4200 KB Output is correct
3 Correct 2609 ms 4104 KB Output is correct
4 Correct 2553 ms 3380 KB Output is correct
5 Correct 2594 ms 3516 KB Output is correct
6 Correct 2670 ms 2932 KB Output is correct
7 Correct 2736 ms 4176 KB Output is correct
8 Correct 2599 ms 4232 KB Output is correct
9 Correct 2586 ms 4092 KB Output is correct
10 Correct 2641 ms 3352 KB Output is correct
11 Correct 2641 ms 3284 KB Output is correct
12 Correct 2598 ms 2468 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2575 ms 4256 KB Output is correct
2 Correct 2744 ms 4200 KB Output is correct
3 Correct 2609 ms 4104 KB Output is correct
4 Correct 2553 ms 3380 KB Output is correct
5 Correct 2594 ms 3516 KB Output is correct
6 Correct 2670 ms 2932 KB Output is correct
7 Correct 2736 ms 4176 KB Output is correct
8 Correct 2599 ms 4232 KB Output is correct
9 Correct 2586 ms 4092 KB Output is correct
10 Correct 2641 ms 3352 KB Output is correct
11 Correct 2641 ms 3284 KB Output is correct
12 Correct 2598 ms 2468 KB Output is correct
13 Correct 2565 ms 4632 KB Output is correct
14 Correct 2589 ms 4568 KB Output is correct
15 Correct 2586 ms 4360 KB Output is correct
16 Correct 2646 ms 3864 KB Output is correct
17 Correct 2573 ms 3972 KB Output is correct
18 Correct 2615 ms 2956 KB Output is correct
19 Correct 2651 ms 4520 KB Output is correct
20 Correct 2575 ms 4560 KB Output is correct
21 Correct 2692 ms 4624 KB Output is correct
22 Correct 2529 ms 3236 KB Output is correct
23 Correct 2601 ms 3540 KB Output is correct
24 Correct 2680 ms 2276 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 0 ms 212 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 5 ms 488 KB Output is correct
8 Correct 5 ms 488 KB Output is correct
9 Correct 5 ms 452 KB Output is correct
10 Correct 4 ms 340 KB Output is correct
11 Correct 4 ms 340 KB Output is correct
12 Correct 5 ms 376 KB Output is correct
13 Correct 5 ms 452 KB Output is correct
14 Correct 5 ms 468 KB Output is correct
15 Correct 5 ms 468 KB Output is correct
16 Correct 5 ms 328 KB Output is correct
17 Correct 5 ms 468 KB Output is correct
18 Correct 4 ms 364 KB Output is correct
19 Correct 2575 ms 4256 KB Output is correct
20 Correct 2744 ms 4200 KB Output is correct
21 Correct 2609 ms 4104 KB Output is correct
22 Correct 2553 ms 3380 KB Output is correct
23 Correct 2594 ms 3516 KB Output is correct
24 Correct 2670 ms 2932 KB Output is correct
25 Correct 2736 ms 4176 KB Output is correct
26 Correct 2599 ms 4232 KB Output is correct
27 Correct 2586 ms 4092 KB Output is correct
28 Correct 2641 ms 3352 KB Output is correct
29 Correct 2641 ms 3284 KB Output is correct
30 Correct 2598 ms 2468 KB Output is correct
31 Correct 2565 ms 4632 KB Output is correct
32 Correct 2589 ms 4568 KB Output is correct
33 Correct 2586 ms 4360 KB Output is correct
34 Correct 2646 ms 3864 KB Output is correct
35 Correct 2573 ms 3972 KB Output is correct
36 Correct 2615 ms 2956 KB Output is correct
37 Correct 2651 ms 4520 KB Output is correct
38 Correct 2575 ms 4560 KB Output is correct
39 Correct 2692 ms 4624 KB Output is correct
40 Correct 2529 ms 3236 KB Output is correct
41 Correct 2601 ms 3540 KB Output is correct
42 Correct 2680 ms 2276 KB Output is correct
43 Correct 2902 ms 6500 KB Output is correct
44 Correct 2811 ms 6488 KB Output is correct
45 Correct 2643 ms 6544 KB Output is correct
46 Correct 2617 ms 4924 KB Output is correct
47 Correct 2585 ms 4860 KB Output is correct
48 Correct 2687 ms 2512 KB Output is correct
49 Correct 2570 ms 6476 KB Output is correct
50 Correct 2679 ms 6372 KB Output is correct
51 Correct 2632 ms 6340 KB Output is correct
52 Correct 2688 ms 4656 KB Output is correct
53 Correct 2603 ms 3984 KB Output is correct