QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#418547#6691. OrderschenxiiWA 0ms3648kbC++14544b2024-05-23 14:26:592024-05-23 14:26:59

Judging History

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

  • [2024-05-23 14:26:59]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3648kb
  • [2024-05-23 14:26:59]
  • 提交

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();
    }
}


詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3648kb

input:

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

output:

YES
YES

result:

wrong answer expected NO, found YES [2nd token]