結果
問題 |
No.2307 [Cherry 5 th Tune *] Cool 46
|
ユーザー |
![]() |
提出日時 | 2023-05-20 11:01:10 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 604 bytes |
コンパイル時間 | 347 ms |
コンパイル使用メモリ | 82,380 KB |
実行使用メモリ | 148,952 KB |
最終ジャッジ日時 | 2024-12-21 09:36:16 |
合計ジャッジ時間 | 23,060 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 41 |
ソースコード
T = int(input()) for t in range(T): N,M = map(int,input().split()) A = set(map(int,input().split())) B = set(map(int,input().split())) CO = A & B AO = A - CO BO = B - CO NC = len(CO) NA = len(AO) NB = len(BO) if NC == 0 and NA * NB > 0: print("No") continue print("Yes") for i in AO: print("Red",i) st = 0 for i in CO: if st == 0: print("Red",i) print("Blue",i) else: print("Blue",i) print("Red",i) st ^= 1 for i in BO: print("Red",i)