Submission #592065

#TimeUsernameProblemLanguageResultExecution timeMemory
592065fuad27Examination (JOI19_examination)C++17
2 / 100
3099 ms1448 KiB
#include<iostream> using namespace std; #pragma GCC target ("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") int main () { int n, q; scanf("%d %d", &n, &q); int s[n], t[n]; for(int i = 0;i<n;i++) { scanf("%d %d", &s[i], &t[i]); } while(q--) { int x, y, z; scanf("%d %d %d", &x, &y, &z); int ans=0; for(int i = 0;i<n;i++) { if(s[i] >= x and t[i] >= y and s[i]+t[i]>=z)ans++; } printf("%d\n", ans); } }

Compilation message (stderr)

examination.cpp: In function 'int main()':
examination.cpp:8:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |  scanf("%d %d", &n, &q);
      |  ~~~~~^~~~~~~~~~~~~~~~~
examination.cpp:11:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   11 |   scanf("%d %d", &s[i], &t[i]);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
examination.cpp:15:8: 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...