Submission #772963

#TimeUsernameProblemLanguageResultExecution timeMemory
772963BlagojExamination (JOI19_examination)C++17
2 / 100
3069 ms2656 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; pair<ll, ll> v[n]; for (int i = 0; i < n; i++) cin >> v[i].first >> v[i].second; while (q--) { ll x, y, z; cin >> x >> y >> z; ll ans = 0; for (int i = 0; i < n; i++) ans += (v[i].first >= x && v[i].second >= y && v[i].first + v[i].second >= z); cout << ans << endl; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...