QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#750091 | #5141. Identical Parity | ckq328 | WA | 0ms | 3664kb | C++20 | 610b | 2024-11-15 12:35:26 | 2024-11-15 12:35:27 |
Judging History
answer
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N=1e6+10,M=200+10,inf=1e18,mod=998244353;
int n,k;
int a[N],f[N];
void solve(){
cin>>n>>k;
if(k==1){
if(n==1) cout<<"yes"<<endl;
else cout<<"No"<<endl;
}
else if(k%2==0) cout<<"yes"<<endl;
else{
if(k==n) cout<<"yes"<<endl;
else cout<<"no"<<endl;
}
}
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int tt;
cin>>tt;
// tt=1;
while(tt--){
solve();
}
}
/*
1
10
598196518 640274071 983359971 71550121 96204862 799843967 446173607 796619138 402690754 223219513
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3664kb
input:
3 3 1 4 2 5 3
output:
No yes no
result:
wrong answer expected YES, found NO [3rd token]