이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |