0分求调
查看原帖
0分求调
676949
lopife楼主2024/8/3 23:07

0分求调,想用位运算加快速度反而过不了

#include<iostream>
using namespace std;
int n,m,T;
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cin>>T;
	for(int i=1;i<=T;i++){
		cin>>n>>m;
		if( ( !m&1 && n==0) || ( m&1 && n!=0) )cout<<"Yes\n";
		else cout<<"No\n";
    }
	return 0;
}
2024/8/3 23:07
加载中...