結果

問題 No.1509 Swap!!
ユーザー oliverx3oliverx3
提出日時 2021-05-12 08:50:24
言語 C++17
(gcc 11.2.0 + boost 1.78.0)
結果
AC  
実行時間 162 ms / 2,000 ms
コード長 227 bytes
コンパイル時間 1,837 ms
使用メモリ 5,160 KB
最終ジャッジ日時 2022-11-22 02:18:20
合計ジャッジ時間 8,827 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 1 ms
4,900 KB
testcase_01 AC 1 ms
4,904 KB
testcase_02 AC 159 ms
4,904 KB
testcase_03 AC 161 ms
5,152 KB
testcase_04 AC 160 ms
4,900 KB
testcase_05 AC 159 ms
4,900 KB
testcase_06 AC 160 ms
4,904 KB
testcase_07 AC 159 ms
5,156 KB
testcase_08 AC 161 ms
5,152 KB
testcase_09 AC 161 ms
4,900 KB
testcase_10 AC 160 ms
5,152 KB
testcase_11 AC 152 ms
4,900 KB
testcase_12 AC 154 ms
5,156 KB
testcase_13 AC 152 ms
4,900 KB
testcase_14 AC 154 ms
4,900 KB
testcase_15 AC 154 ms
4,908 KB
testcase_16 AC 151 ms
5,160 KB
testcase_17 AC 150 ms
4,904 KB
testcase_18 AC 149 ms
4,904 KB
testcase_19 AC 151 ms
5,160 KB
testcase_20 AC 150 ms
4,908 KB
testcase_21 AC 159 ms
5,156 KB
testcase_22 AC 162 ms
4,904 KB
testcase_23 AC 160 ms
4,904 KB
testcase_24 AC 160 ms
4,904 KB
testcase_25 AC 160 ms
4,900 KB
testcase_26 AC 160 ms
4,904 KB
testcase_27 AC 127 ms
4,904 KB
testcase_28 AC 129 ms
4,904 KB
testcase_29 AC 128 ms
4,904 KB
testcase_30 AC 153 ms
4,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

int main() {
    int t;
    std::cin >> t;
    while(t--) {
        long long n, a, b;
        std::cin >> n >> a >> b;
        printf(std::gcd(a, b)==1&&a-1<=n-b?"YES\n":"NO\n");
    }
    return 0;
}
0