Submission #274196

#TimeUsernameProblemLanguageResultExecution timeMemory
274196okaragulExamination (JOI19_examination)C++17
2 / 100
3043 ms2184 KiB
#include<bits/stdc++.h> using namespace std; #define lli long long #define INF LONG_LONG_MAX #define pb push_back #define mp make_pair #define st first #define nd second #define endl '\n' #define max(aa, bb) (aa > bb ? aa:bb) #define min(aa, bb) (aa < bb ? aa:bb) #define min3(aa, bb, cc) cout<<aa<<" "<<bb<<" "<<cc<<endl #define all(aa) aa.begin(), aa.end() int main(){ #ifdef ONLINE_JUDGE freopen("zgir.gir", "r", stdin); freopen("zcik.cik", "w", stdout); #endif lli n,q; cin>>n>>q; vector<pair<lli ,lli> > v(n); for(auto &it:v) cin>>it.st>>it.nd; while(q--){ lli mat, bil, sum, cvp=0; cin>>mat>>bil>>sum; for(auto &it:v) if(it.st>=mat && it.nd>=bil && it.st+it.nd>=sum) cvp++; cout<<cvp<<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...