結果
問題 | No.2845 Birthday Pattern in Two Different Calendars |
ユーザー |
![]() |
提出日時 | 2024-08-23 22:58:31 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 481 bytes |
コンパイル時間 | 527 ms |
コンパイル使用メモリ | 82,404 KB |
実行使用メモリ | 117,684 KB |
最終ジャッジ日時 | 2024-08-23 22:58:37 |
合計ジャッジ時間 | 6,200 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 7 WA * 15 |
ソースコード
t = int(input())for _ in range(t):k, m, n = map(int, input().split())if k < n * 2 or m == 1:print("No")continuest = set()ans = []for a in range(1, k + 1):b = (a + m - 2) % k + 1if (not a in st) and (not b in st):st.add(a)st.add(b)ans.append(a)if len(ans) == n:breakif len(ans) == n:print("Yes")print(*ans)else:print("No")