Submission #1251649

#TimeUsernameProblemLanguageResultExecution timeMemory
1251649Kel_MahmutExamination (JOI19_examination)C++20
100 / 100
1686 ms1784 KiB
#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 (stderr)

examination.cpp: In function 'int main()':
examination.cpp:9:14: 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:22: 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:22: 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...