제출 #649947

#제출 시각아이디문제언어결과실행 시간메모리
649947kakayoshiExamination (JOI19_examination)C++14
2 / 100
3002 ms4176 KiB
#include <bits/stdc++.h> #define Loop(x,l,r) for (ll x = (l); x < (r); ++x) #define LoopR(x,l,r) for (ll x = (r)-1; x >= (l); --x) typedef long long ll; typedef std::pair<int, int> pii; typedef std::pair<ll , ll > pll; using namespace std; #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx") const int N = 100'010; int a[N], b[N]; int n, q; int main() { cin.tie(0) -> sync_with_stdio(false); cin >> n >> q; Loop (i,0,n) cin >> a[i] >> b[i]; Loop (i,0,q) { int x,y,z; cin >> x >> y >> z; int ans = 0; Loop (i,0,n) { int t1 = -(a[i]>=x); int t2 = -(b[i]>=y); int t3 = -(a[i]+b[i]>=z); ans -= t1 & t2 & t3; } cout << ans << '\n'; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...