Submission #470972

#TimeUsernameProblemLanguageResultExecution timeMemory
470972spike1236Examination (JOI19_examination)C++14
2 / 100
3058 ms3968 KiB
#include <iostream> #pragma GCC optimize("-Ofast") #pragma GCC target("avx,avx2,fma") using namespace std; const int MAXN = 1e5 + 10; int a[MAXN], b[MAXN]; int main() { int n, q; scanf("%d%d", &n, &q); for(int i = 0; i < n; ++i) scanf("%d%d", a + i, b + i); int x, y, z, ans = 0; for(int i = 0; i < q; ++i) { scanf("%d%d%d", &x, &y, &z); ans = 0; for(int j = 0; j < n; ++j) if(a[j] >= x && b[j] >= y && a[j] + b[j] >= z) ++ans; cout << ans << '\n'; } return 0; }

Compilation message (stderr)

examination.cpp: In function 'int main()':
examination.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |     scanf("%d%d", &n, &q);
      |     ~~~~~^~~~~~~~~~~~~~~~
examination.cpp:12:37: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |     for(int i = 0; i < n; ++i) scanf("%d%d", a + i, b + i);
      |                                ~~~~~^~~~~~~~~~~~~~~~~~~~~~
examination.cpp:15:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   15 |         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...