CSES Coin Piles
// compile: g++ -o data data.cpp -std=gnu++20 -DLOCAL
// run: ./data < data.in
#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#ifdef LOCAL
#endif
#define sz(v) ((int)(v).size())
#define PV(v) for (int i=0;i<v.size();++i)cout<<v[i]<<" ";cout<<endl;
#define INTINF 9223372036854775807
#define int long long

using namespace std;

int32_t main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int _; cin >> _;
    while (_--) {
        int a, b; cin >> a >> b;
        if (max(a, b) > min(a, b) * 2) {
            cout << "NO" << endl;
            continue;
        }
        if ((a + b) % 3 != 0) {
            cout << "NO" << endl;
            continue;
        }
        cout << "YES" << endl;
    }

    return 0;
}

Comments

  1. 4 weeks ago
    2025-12-06 2:32:59

    Heard some buzz about lucky22gamelogin. Logged in, played around. Decent, not gonna lie. Easy to get into. Worth a look if you’re hunting for something new to play. Check it lucky22gamelogin out

  2. 2 weeks ago
    2025-12-19 13:47:59

    Checking out ta28. This one is quite interesting. Would recommend, solid choice for something new. Let me know what you think of the website once you visit it yourself! ta28

  3. 3 days ago
    2025-12-29 6:16:18

    Alright Hit Club fanatics, hitclubgamehitclub1.com looks like another portal to the game. Anyone playing through them? Worth checking out? hitclubgamehitclub1

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
Previous
Next