Submission #592066

# Submission time Handle Problem Language Result Execution time Memory
592066 2022-07-08T12:52:59 Z fuad27 Examination (JOI19_examination) C++17
2 / 100
3000 ms 1336 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++) {
			if(s[i] >= x and t[i] >= y and s[i]+t[i]>=z)ans++;
		}
		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);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory 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 0 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 41 ms 336 KB Output is correct
8 Correct 40 ms 340 KB Output is correct
9 Correct 43 ms 332 KB Output is correct
10 Correct 42 ms 336 KB Output is correct
11 Correct 45 ms 336 KB Output is correct
12 Correct 44 ms 316 KB Output is correct
13 Correct 37 ms 340 KB Output is correct
14 Correct 41 ms 336 KB Output is correct
15 Correct 38 ms 344 KB Output is correct
16 Correct 17 ms 336 KB Output is correct
17 Correct 30 ms 212 KB Output is correct
18 Correct 8 ms 336 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 3058 ms 1336 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 3058 ms 1336 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory 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 0 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 41 ms 336 KB Output is correct
8 Correct 40 ms 340 KB Output is correct
9 Correct 43 ms 332 KB Output is correct
10 Correct 42 ms 336 KB Output is correct
11 Correct 45 ms 336 KB Output is correct
12 Correct 44 ms 316 KB Output is correct
13 Correct 37 ms 340 KB Output is correct
14 Correct 41 ms 336 KB Output is correct
15 Correct 38 ms 344 KB Output is correct
16 Correct 17 ms 336 KB Output is correct
17 Correct 30 ms 212 KB Output is correct
18 Correct 8 ms 336 KB Output is correct
19 Execution timed out 3058 ms 1336 KB Time limit exceeded
20 Halted 0 ms 0 KB -