結果
| 問題 | No.1509 Swap!! | 
| コンテスト | |
| ユーザー |  🍮かんプリン | 
| 提出日時 | 2021-05-18 01:52:02 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 478 bytes | 
| コンパイル時間 | 1,752 ms | 
| コンパイル使用メモリ | 166,720 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-07 15:05:44 | 
| 合計ジャッジ時間 | 10,401 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 1 | 
| other | WA * 30 | 
ソースコード
/**
 *   @FileName	a.cpp
 *   @Author	kanpurin
 *   @Created	2021.05.18 01:51:55
**/
#include "bits/stdc++.h" 
using namespace std; 
typedef long long ll;
int main() {
    int t;cin >> t;
    while(t--) {
        ll n,a,b;cin >> n >> a >> b;
        ll g = __gcd(a,b);
        if (g != 1) {
            puts("NO");
            continue;
        }
        if (a > b) swap(a,b);
        if (2*a - n > 0 || 2*b-n > a-1) puts("NO");
        else puts("YES");
    }
    return 0;
}
            
            
            
        