Submission #772971

#TimeUsernameProblemLanguageResultExecution timeMemory
772971BlagojExamination (JOI19_examination)C++17
2 / 100
3069 ms1592 KiB
#include <bits/stdc++.h> #ifdef LOCAL #include "debug.h" #else #define debug(...) 42 #endif #pragma GCC optimize("Ofast,unroll-loops") using namespace std; #define endl '\n' #define ll long long #define all(x) x.begin(), x.end() int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n, q; cin >> n >> q; int a[n], b[n]; for (int i = 0; i < n; i++) cin >> a[i] >> b[i]; while (q--) { int x, y, z, ans = 0; cin >> x >> y >> z; for (int i = 0; i < n; i++) ans += (a[i] >= x & b[i] >= y & a[i] + b[i] >= z); cout << ans << '\n'; } }

Compilation message (stderr)

examination.cpp: In function 'int main()':
examination.cpp:27:50: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   27 |         for (int i = 0; i < n; i++) ans += (a[i] >= x & b[i] >= y & a[i] + b[i] >= z);
      |                                             ~~~~~^~~~
examination.cpp:27:81: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   27 |         for (int i = 0; i < n; i++) ans += (a[i] >= x & b[i] >= y & a[i] + b[i] >= 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...