結果
| 問題 | No.2307 [Cherry 5 th Tune *] Cool 46 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-22 22:54:53 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 903 bytes |
| 記録 | |
| コンパイル時間 | 812 ms |
| コンパイル使用メモリ | 85,504 KB |
| 実行使用メモリ | 144,360 KB |
| 最終ジャッジ日時 | 2026-05-28 21:37:09 |
| 合計ジャッジ時間 | 23,036 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 36 |
ソースコード
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()))
a = set(A)
b = set(B)
c = a & b
if N == 0:
print('Yes')
for bb in B:
print('Blue',bb)
continue
if M == 0:
print('Yes')
for aa in A:
print('Red',aa)
continue
if len(c) == 0:
print('No')
continue
print('Yes')
for aa in A:
if aa not in c:
print('Red',aa)
u = c.pop()
print('Red',u)
print('Blue',u)
for bb in B:
if bb not in c and bb != u:
print('Blue',u)
now = True
while c:
u = c.pop()
if now:
print("Blue",u)
print("Red",u)
else:
print('Red',u)
print('Blue',u)
now = not now