結果
| 問題 |
No.2845 Birthday Pattern in Two Different Calendars
|
| コンテスト | |
| ユーザー |
Ayuna
|
| 提出日時 | 2024-08-23 23:29:13 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 807 bytes |
| コンパイル時間 | 200 ms |
| コンパイル使用メモリ | 82,248 KB |
| 実行使用メモリ | 117,172 KB |
| 最終ジャッジ日時 | 2024-08-23 23:29:19 |
| 合計ジャッジ時間 | 5,817 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 1 |
| other | AC * 1 RE * 21 |
ソースコード
t = int(input())
for _ in range(t):
k, m, n = map(int, input().split())
if k < n * 2 or m == 1:
print("No")
continue
st = set()
ans = []
if m > k // 2:
for b in range(1, k + 1):
a = (b - m) % k + 1
if (not a in st) and (not b in st):
st.add(a)
st.add(b)
ans.append(a)
if len(ans) == n:
break
else:
for a in range(1, k + 1):
b = (a + m - 2) % k + 1
if (not a in st) and (not b in st):
st.add(a)
st.add(b)
ans.append(a)
if len(ans) == n:
break
if len(ans) == n:
print("Yes")
print(*ans)
else:
print("No")
assert 0
Ayuna