結果

問題 No.1571 All Your Cycles Are Same Lengths
ユーザー NatsubiSogan
提出日時 2021-06-27 14:57:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 82,356 KB
実行使用メモリ 68,804 KB
最終ジャッジ日時 2024-06-25 11:44:03
合計ジャッジ時間 2,268 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 4 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
    n, t = map(int, input().split())
    if t % 2: print("No"); continue
    print("Yes")
    for i in range(1, n + 1):
        if i == 2:
            for j in range(i + 1, n + 1):
                print(i, j, t // 2)
        else:
            for j in range(i + 1, n + 1):
                if j == 2:
                    print(i, j, t // 2)
                else:
                    print(i, j, 0)
0