結果
| 問題 | No.2307 [Cherry 5 th Tune *] Cool 46 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-22 22:54:53 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 903 bytes |
| 記録 | |
| コンパイル時間 | 62 ms |
| コンパイル使用メモリ | 82,168 KB |
| 実行使用メモリ | 147,048 KB |
| 最終ジャッジ日時 | 2026-10-06 01:53:57 |
| 合計ジャッジ時間 | 24,899 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / 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