Submission #715410

#TimeUsernameProblemLanguageResultExecution timeMemory
715410fuad27Examination (JOI19_examination)C++17
100 / 100
2764 ms3524 KiB
#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++) { int ff=(s[i]>=x); int ss=(t[i]>=y); int tt=(s[i]+t[i]>=z); ans+=ff&ss&tt; } printf("%d\n", ans); } }

Compilation message (stderr)

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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...