QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#418544#6691. OrderschenxiiML 0ms0kbC++14544b2024-05-23 14:25:222024-05-23 14:25:22

Judging History

你现在查看的是最新测评结果

  • [2024-05-23 14:25:22]
  • 评测
  • 测评结果:ML
  • 用时:0ms
  • 内存:0kb
  • [2024-05-23 14:25:22]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
const int N=1e9+10;


void solve(){ 
    int n,k;cin>>n>>k;
   int num[N];
    for(int i=1;i<=n;i++){
        num[i]+=k;
}
    for(int i=1;i<=n;i++){
        int a,b;
        cin>>a>>b;
        if(num[a]<b){cout<<"NO"<<endl;return;}
    }


    cout<<"YES"<<endl;







}



signed main(void){
    IOS
    int t=1;
    cin>>t;
    while(t--){
        solve();
    }
}


Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Memory Limit Exceeded

input:

2
4 5
6 12
1 3
6 15
8 1
3 100
3 200
4 300
6 100

output:


result: