Submission #716074

#TimeUsernameProblemLanguageResultExecution timeMemory
716074baneExamination (JOI19_examination)C++17
100 / 100
2987 ms6588 KiB
#include <bits/stdc++.h> #pragma GCC target ("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") using namespace std; #ifdef LOCAL #define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__) #else #define dbg(...) #endif #define ar array #define ll long long #define ld long double #define sza(x) ((int)x.size()) #define all(a) (a).begin(), (a).end() #define pb push_back #define mp make_pair #define frs first #define sc second #define eb emplace_back #define fr(i, n, m) for(int i = (n); i < (m); i ++) const int MAX_N = 1e5 + 5; const ll MOD = 1e9 + 7; const ll INF = 1e9; const ld EPS = 1e-9; int dx[4] = {0,0,1,-1}; int dy[4] = {-1,1,0,0}; const int Block = 310; int n,q; int A[100001], B[100001]; int main() { scanf("%d%d", &n, &q); fr(i, 0, n) scanf("%d%d", &A[i], &B[i]); while(q--){ int x,y,z; scanf("%d%d%d", &x, &y, &z); int ans = 0; fr(i, 0, n){ ans+=(A[i] >= x) & (B[i] >= y) & (A[i] + B[i] >= z); } printf("%d\n", ans); } }

Compilation message (stderr)

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