結果
| 問題 |
No.2845 Birthday Pattern in Two Different Calendars
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2024-08-25 03:00:41 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 463 bytes |
| コンパイル時間 | 335 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 18,552 KB |
| 最終ジャッジ日時 | 2024-08-25 03:00:49 |
| 合計ジャッジ時間 | 6,664 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 WA * 15 |
ソースコード
import sys
input = sys.stdin.readline
T=int(input())
for tests in range(T):
K,M,N=map(int,input().split())
M-=1
if M==0:
print("No")
continue
USE=[0]*K
ANS=[]
for i in range(K):
if USE[i]==0 and USE[(i+M)%K]==0:
ANS.append(i+1)
USE[i]=1
USE[(i+M)%K]=1
if len(ANS)>=N:
print("Yes")
print(*ANS[:N])
else:
print("No")
titia