题解:P14069 初遇
lailai0916 · · 题解
解题思路
显然
如果
或
后续每一步始终操作另一个数,得到:
或
由于
如果
参考代码
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T;
cin>>T;
while(T--)
{
ll a,b,n;
cin>>a>>b>>n;
cout<<(a==n||b==n||a+b==n||(a==b&&a*3==n)?"No":"Yes")<<'\n';
}
return 0;
}