結果
問題 |
No.2307 [Cherry 5 th Tune *] Cool 46
|
ユーザー |
|
提出日時 | 2023-05-19 22:10:30 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 710 bytes |
コンパイル時間 | 430 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 137,320 KB |
最終ジャッジ日時 | 2024-12-21 02:54:37 |
合計ジャッジ時間 | 30,740 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 40 |
ソースコード
T=int(input()) for _ in range(T): n,m=map(int,input().split()) A=list(map(int,input().split())) B=list(map(int,input().split())) SA,SB=set(A),set(B) S=SA&SB if 0<n and 0<m and len(S)==0: print("No") continue print("Yes") if n==0: for e in SB: print("Blue",e) continue if m==0: for e in SA: print("Red",e) continue LS=list(S) SA-=S SB-=S for e in SA: print("Red",e) print("Red",LS[0]) print("Blue",LS[0]) for e in SB: print("Blue",e) if 1<len(LS): for i in range(1,len(LS)): e=LS[i] if i%2==0: print("Blue",e) print("Red",e) else: print("Red",e) print("Blue",e)