結果

問題 No.2845 Birthday Pattern in Two Different Calendars
ユーザー timi
提出日時 2024-08-23 22:14:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 531 bytes
コンパイル時間 321 ms
コンパイル使用メモリ 82,464 KB
実行使用メモリ 118,580 KB
最終ジャッジ日時 2024-08-23 22:14:28
合計ジャッジ時間 5,345 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 7 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import heapq 
from heapq import heappop,heappush,heapify
from sys import stdin, setrecursionlimit
input = stdin.readline
readline = stdin.readline
T=int(input())
from collections import deque
d=deque()

for _ in range(T):
  K,M,N=map(int, input().split())
  #C=list(map(int, input().split()))
  ans=[]
  D={}
  q=M-1
  for p in range(1,K+1):
    q+=1
    if q>K:
      q=1 
    if p not in D and q not in D and p!=q:
      D[p]=1;D[q]=1;ans.append(p)
  if len(ans)<N:
    print('No')
  else:
    print('Yes')
    print(*ans[:N])
  
0