Submission #722477

#TimeUsernameProblemLanguageResultExecution timeMemory
722477saayan007Examination (JOI19_examination)C++17
2 / 100
3036 ms3528 KiB
#include "bits/stdc++.h" using namespace std; #define int long long #define fr first #define sc second #define eb emplace_back #define nl "\n" signed main() { ios::sync_with_stdio(0); cin.tie(0); int n, q; cin >> n >> q; pair<int, int> s[n + 1]; for(int i = 1; i <= n; ++i) cin >> s[i].fr >> s[i].sc; while(q--) { int ans = 0; int x, y, z; cin >> x >> y >> z; for(int i = 1; i <= n; ++i) { if(s[i].fr >= x && s[i].sc >= y && s[i].fr + s[i].sc >= z) ++ans; } cout << ans << nl; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...