codeforces 1260 B. Obtain Two Zeroes
程序员文章站
2022-06-02 11:49:48
...
分析:
#include<cstdio>
#include<cstring>
#include<string>
#include<cmath>
#include<algorithm>
#include<iostream>
#define ll long long
using namespace std;
ll a,b;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
ll aa,bb;
cin>>aa>>bb;
a=max(aa,bb);
b=min(aa,bb);
int ok;
if(a<=2*b)
{
if((a+b)%3==0)
ok=1;
else
ok=0;
}
else
ok=0;
if(ok==0)
cout<<"NO\n";
else
cout<<"YES\n";
}
return 0;
}
上一篇: 二叉树左右子树的翻转
下一篇: 9.1 数字三角形
推荐阅读
-
Codeforces Round #673 (Div. 2) B. Two Arrays(思维,构造)
-
codeforces B. Two Arrays And Swaps
-
Codeforces Round #479 (Div. 3) B. Two-gram
-
B. Two Arrays(模拟+思维)Codeforces Round #673 (Div. 2)
-
codeforces 1260 B. Obtain Two Zeroes
-
Codeforces Round #268 (Div. 1)-B. Two Sets_html/css_WEB-ITnose
-
Codeforces Round #268 (Div. 1)-B. Two Sets_html/css_WEB-ITnose
-
Codeforces Round #642 (Div. 3) B. Two Arrays And Swaps