Submission #497650

#TimeUsernameProblemLanguageResultExecution timeMemory
497650penguin133Examination (JOI19_examination)C++17
2 / 100
3082 ms2992 KiB
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math") #pragma GCC target("avx2,popcnt") #include <bits/stdc++.h> using namespace std; const int N = 100005; int n, q, s[N], t[N]; int main() { scanf("%d %d", &n, &q); for (int i = 1; i <= n; i++) { scanf("%d %d", &s[i], &t[i]); } while (q--) { int x, y, z, ans = 0; scanf("%d %d %d", &x, &y, &z); for (int i = 1; i <= n; i++) if (s[i] >= x && t[i] >= y && s[i] + t[i] >= z) ans++; printf("%d\n", ans); } return 0; }

Compilation message (stderr)

examination.cpp: In function 'int main()':
examination.cpp:10:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |  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", &x, &y, &z);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...