답안 #886659

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
886659 2023-12-12T15:06:08 Z Kel_Mahmut Examination (JOI19_examination) C++14
100 / 100
2039 ms 6612 KB
#pragma GCC optimize ("O3,unroll-loops")
#pragma GCC target("avx2")
#include <bits/stdc++.h>

using namespace std;

int main(){
	int n, q;
	scanf("%d%d", &n, &q);
	vector<int> S(n), T(n);
	for(int i = 0; i < n; i++){
		scanf("%d%d", &S[i], &T[i]);
	}
	int cnt = 0, A, B, C;
	for(int i = 0; i < q; i++){
		scanf("%d%d%d", &A, &B, &C);
		for(int j = 0; j < n; j++){
			if(S[j] >= A && T[j] >= B && S[j] + T[j] >= C){
				cnt++;
			}
		}
		printf("%d\n", cnt);
		cnt = 0;
	}
}

Compilation message

examination.cpp: In function 'int main()':
examination.cpp:9:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |  scanf("%d%d", &n, &q);
      |  ~~~~~^~~~~~~~~~~~~~~~
examination.cpp:12:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |   scanf("%d%d", &S[i], &T[i]);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~
examination.cpp:16:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |   scanf("%d%d%d", &A, &B, &C);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 3 ms 604 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 344 KB Output is correct
11 Correct 3 ms 348 KB Output is correct
12 Correct 4 ms 452 KB Output is correct
13 Correct 4 ms 344 KB Output is correct
14 Correct 4 ms 840 KB Output is correct
15 Correct 3 ms 348 KB Output is correct
16 Correct 3 ms 348 KB Output is correct
17 Correct 3 ms 348 KB Output is correct
18 Correct 3 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1846 ms 4176 KB Output is correct
2 Correct 1850 ms 4240 KB Output is correct
3 Correct 1855 ms 4512 KB Output is correct
4 Correct 1879 ms 3756 KB Output is correct
5 Correct 1853 ms 3648 KB Output is correct
6 Correct 1804 ms 2976 KB Output is correct
7 Correct 1830 ms 3984 KB Output is correct
8 Correct 1942 ms 4312 KB Output is correct
9 Correct 1951 ms 4108 KB Output is correct
10 Correct 2039 ms 3332 KB Output is correct
11 Correct 1927 ms 3192 KB Output is correct
12 Correct 1906 ms 2584 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1846 ms 4176 KB Output is correct
2 Correct 1850 ms 4240 KB Output is correct
3 Correct 1855 ms 4512 KB Output is correct
4 Correct 1879 ms 3756 KB Output is correct
5 Correct 1853 ms 3648 KB Output is correct
6 Correct 1804 ms 2976 KB Output is correct
7 Correct 1830 ms 3984 KB Output is correct
8 Correct 1942 ms 4312 KB Output is correct
9 Correct 1951 ms 4108 KB Output is correct
10 Correct 2039 ms 3332 KB Output is correct
11 Correct 1927 ms 3192 KB Output is correct
12 Correct 1906 ms 2584 KB Output is correct
13 Correct 2003 ms 4708 KB Output is correct
14 Correct 1927 ms 4740 KB Output is correct
15 Correct 1852 ms 4416 KB Output is correct
16 Correct 1868 ms 4100 KB Output is correct
17 Correct 1866 ms 3884 KB Output is correct
18 Correct 1932 ms 3196 KB Output is correct
19 Correct 1865 ms 4544 KB Output is correct
20 Correct 1869 ms 4488 KB Output is correct
21 Correct 1868 ms 4912 KB Output is correct
22 Correct 1825 ms 3724 KB Output is correct
23 Correct 1843 ms 3124 KB Output is correct
24 Correct 1860 ms 2364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 3 ms 604 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 344 KB Output is correct
11 Correct 3 ms 348 KB Output is correct
12 Correct 4 ms 452 KB Output is correct
13 Correct 4 ms 344 KB Output is correct
14 Correct 4 ms 840 KB Output is correct
15 Correct 3 ms 348 KB Output is correct
16 Correct 3 ms 348 KB Output is correct
17 Correct 3 ms 348 KB Output is correct
18 Correct 3 ms 348 KB Output is correct
19 Correct 1846 ms 4176 KB Output is correct
20 Correct 1850 ms 4240 KB Output is correct
21 Correct 1855 ms 4512 KB Output is correct
22 Correct 1879 ms 3756 KB Output is correct
23 Correct 1853 ms 3648 KB Output is correct
24 Correct 1804 ms 2976 KB Output is correct
25 Correct 1830 ms 3984 KB Output is correct
26 Correct 1942 ms 4312 KB Output is correct
27 Correct 1951 ms 4108 KB Output is correct
28 Correct 2039 ms 3332 KB Output is correct
29 Correct 1927 ms 3192 KB Output is correct
30 Correct 1906 ms 2584 KB Output is correct
31 Correct 2003 ms 4708 KB Output is correct
32 Correct 1927 ms 4740 KB Output is correct
33 Correct 1852 ms 4416 KB Output is correct
34 Correct 1868 ms 4100 KB Output is correct
35 Correct 1866 ms 3884 KB Output is correct
36 Correct 1932 ms 3196 KB Output is correct
37 Correct 1865 ms 4544 KB Output is correct
38 Correct 1869 ms 4488 KB Output is correct
39 Correct 1868 ms 4912 KB Output is correct
40 Correct 1825 ms 3724 KB Output is correct
41 Correct 1843 ms 3124 KB Output is correct
42 Correct 1860 ms 2364 KB Output is correct
43 Correct 1913 ms 6468 KB Output is correct
44 Correct 1821 ms 6604 KB Output is correct
45 Correct 1861 ms 6484 KB Output is correct
46 Correct 1837 ms 4832 KB Output is correct
47 Correct 1850 ms 4840 KB Output is correct
48 Correct 1840 ms 2700 KB Output is correct
49 Correct 1826 ms 6612 KB Output is correct
50 Correct 1911 ms 6532 KB Output is correct
51 Correct 1899 ms 6436 KB Output is correct
52 Correct 1825 ms 4888 KB Output is correct
53 Correct 1870 ms 4516 KB Output is correct