Submission #983718

#TimeUsernameProblemLanguageResultExecution timeMemory
983718AmaarsaaExamination (JOI19_examination)C++14
100 / 100
1967 ms6896 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: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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...