Submission #1003469

#TimeUsernameProblemLanguageResultExecution timeMemory
1003469ZeroCoolExamination (JOI19_examination)C++14
2 / 100
3090 ms3420 KiB
#include <bits/stdc++.h> using namespace std; #define int long long //#define ll long long #define ar array #define ld long double const int N = 2005; #pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") signed main(){ios::sync_with_stdio(false);cin.tie(0); int n, q; cin>>n>>q; ar<int, 2> A[n]; for(int i = 0;i < n;i++)cin>>A[i][0]>>A[i][1]; while(q--){ int a, b, c; cin>>a>>b>>c; int ans = 0; for(int i = 0;i < n;i++){ if(A[i][0] >= a && A[i][1] >= b && (A[i][0] + A[i][1]) >= c)ans++; } cout<<ans<<'\n'; } }

Compilation message (stderr)

examination.cpp:13: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
   13 | #pragma GCC optimization ("O3")
      | 
examination.cpp:14: warning: ignoring '#pragma GCC optimization' [-Wunknown-pragmas]
   14 | #pragma GCC optimization ("unroll-loops")
      |
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...