Submission #983718

# Submission time Handle Problem Language Result Execution time Memory
983718 2024-05-16T02:25:10 Z Amaarsaa Examination (JOI19_examination) C++14
100 / 100
1967 ms 6896 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);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 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 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 4 ms 572 KB Output is correct
8 Correct 5 ms 564 KB Output is correct
9 Correct 3 ms 608 KB Output is correct
10 Correct 3 ms 344 KB Output is correct
11 Correct 3 ms 348 KB Output is correct
12 Correct 3 ms 348 KB Output is correct
13 Correct 4 ms 564 KB Output is correct
14 Correct 5 ms 600 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 448 KB Output is correct
18 Correct 3 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1865 ms 4352 KB Output is correct
2 Correct 1928 ms 4468 KB Output is correct
3 Correct 1857 ms 4504 KB Output is correct
4 Correct 1821 ms 3696 KB Output is correct
5 Correct 1889 ms 3404 KB Output is correct
6 Correct 1899 ms 2664 KB Output is correct
7 Correct 1843 ms 4276 KB Output is correct
8 Correct 1920 ms 4156 KB Output is correct
9 Correct 1902 ms 4140 KB Output is correct
10 Correct 1862 ms 3384 KB Output is correct
11 Correct 1956 ms 3240 KB Output is correct
12 Correct 1880 ms 2464 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1865 ms 4352 KB Output is correct
2 Correct 1928 ms 4468 KB Output is correct
3 Correct 1857 ms 4504 KB Output is correct
4 Correct 1821 ms 3696 KB Output is correct
5 Correct 1889 ms 3404 KB Output is correct
6 Correct 1899 ms 2664 KB Output is correct
7 Correct 1843 ms 4276 KB Output is correct
8 Correct 1920 ms 4156 KB Output is correct
9 Correct 1902 ms 4140 KB Output is correct
10 Correct 1862 ms 3384 KB Output is correct
11 Correct 1956 ms 3240 KB Output is correct
12 Correct 1880 ms 2464 KB Output is correct
13 Correct 1875 ms 4768 KB Output is correct
14 Correct 1921 ms 4728 KB Output is correct
15 Correct 1848 ms 4608 KB Output is correct
16 Correct 1920 ms 3884 KB Output is correct
17 Correct 1848 ms 4316 KB Output is correct
18 Correct 1901 ms 2912 KB Output is correct
19 Correct 1943 ms 4972 KB Output is correct
20 Correct 1846 ms 4468 KB Output is correct
21 Correct 1872 ms 4564 KB Output is correct
22 Correct 1841 ms 3136 KB Output is correct
23 Correct 1873 ms 3440 KB Output is correct
24 Correct 1894 ms 2420 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 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 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 4 ms 572 KB Output is correct
8 Correct 5 ms 564 KB Output is correct
9 Correct 3 ms 608 KB Output is correct
10 Correct 3 ms 344 KB Output is correct
11 Correct 3 ms 348 KB Output is correct
12 Correct 3 ms 348 KB Output is correct
13 Correct 4 ms 564 KB Output is correct
14 Correct 5 ms 600 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 448 KB Output is correct
18 Correct 3 ms 348 KB Output is correct
19 Correct 1865 ms 4352 KB Output is correct
20 Correct 1928 ms 4468 KB Output is correct
21 Correct 1857 ms 4504 KB Output is correct
22 Correct 1821 ms 3696 KB Output is correct
23 Correct 1889 ms 3404 KB Output is correct
24 Correct 1899 ms 2664 KB Output is correct
25 Correct 1843 ms 4276 KB Output is correct
26 Correct 1920 ms 4156 KB Output is correct
27 Correct 1902 ms 4140 KB Output is correct
28 Correct 1862 ms 3384 KB Output is correct
29 Correct 1956 ms 3240 KB Output is correct
30 Correct 1880 ms 2464 KB Output is correct
31 Correct 1875 ms 4768 KB Output is correct
32 Correct 1921 ms 4728 KB Output is correct
33 Correct 1848 ms 4608 KB Output is correct
34 Correct 1920 ms 3884 KB Output is correct
35 Correct 1848 ms 4316 KB Output is correct
36 Correct 1901 ms 2912 KB Output is correct
37 Correct 1943 ms 4972 KB Output is correct
38 Correct 1846 ms 4468 KB Output is correct
39 Correct 1872 ms 4564 KB Output is correct
40 Correct 1841 ms 3136 KB Output is correct
41 Correct 1873 ms 3440 KB Output is correct
42 Correct 1894 ms 2420 KB Output is correct
43 Correct 1881 ms 6620 KB Output is correct
44 Correct 1898 ms 6896 KB Output is correct
45 Correct 1910 ms 6392 KB Output is correct
46 Correct 1876 ms 4952 KB Output is correct
47 Correct 1967 ms 5544 KB Output is correct
48 Correct 1825 ms 2476 KB Output is correct
49 Correct 1893 ms 6704 KB Output is correct
50 Correct 1901 ms 6616 KB Output is correct
51 Correct 1847 ms 6268 KB Output is correct
52 Correct 1870 ms 5136 KB Output is correct
53 Correct 1856 ms 3956 KB Output is correct