Submission #788693

#TimeUsernameProblemLanguageResultExecution timeMemory
788693prefixorsuuffiixxExamination (JOI19_examination)C++14
2 / 100
3060 ms4204 KiB
#include <bits/stdc++.h> #pragma GCC target ("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("Ofast,unroll-loops") using namespace std; int main() { ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); int n,m; cin>>n>>m; int a[n],b[n]; for (int i = 0;i<n;i++)cin>>a[i]>>b[i]; long long ans; int x,y,z; while(m--){ 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:18:49: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   18 |         for (int i = 0; i < n; i++)ans += (a[i] >= x & b[i] >= y & a[i]+b[i]>=z);
      |                                            ~~~~~^~~~
examination.cpp:18:77: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
   18 |         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...