제출 #1135247

#제출 시각아이디문제언어결과실행 시간메모리
1135247antonnExamination (JOI19_examination)C++20
100 / 100
1730 ms1816 KiB
#include <bits/stdc++.h> #pragma GCC target ("avx2") #pragma GCC optimize ("O3") #pragma GCC optimize ("unroll-loops") #define F first #define S second using namespace std; using ll = long long; using pi = pair<int, int>; using vi = vector<int>; template<class T> bool ckmin(T& a, T b) { return b < a ? a = b, true : false; } template<class T> bool ckmax(T& a, T b) { return a < b ? a = b, true : false; } int main() { ios::sync_with_stdio(0); cin.tie(0); int n, q; cin >> n >> q; vector<int> s(n + 1), t(n + 1); for (int i = 1; i <= n; ++i) cin >> s[i] >> t[i]; while (q--) { int a, b, c; cin >> a >> b >> c; int ans = 0; for (int i = 1; i <= n; ++i) { if (s[i] >= a && t[i] >= b && s[i]+t[i] >= c) { ++ans; } } 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...