結果

問題 No.2307 [Cherry 5 th Tune *] Cool 46
ユーザー 👑 p-adicp-adic
提出日時 2023-05-20 16:58:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,236 ms / 2,000 ms
コード長 418 bytes
コンパイル時間 113 ms
コンパイル使用メモリ 10,908 KB
実行使用メモリ 41,496 KB
最終ジャッジ日時 2023-08-23 09:46:49
合計ジャッジ時間 35,756 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,824 KB
testcase_01 AC 16 ms
7,812 KB
testcase_02 AC 227 ms
8,184 KB
testcase_03 AC 178 ms
10,352 KB
testcase_04 AC 185 ms
10,744 KB
testcase_05 AC 178 ms
10,164 KB
testcase_06 AC 180 ms
10,556 KB
testcase_07 AC 154 ms
10,788 KB
testcase_08 AC 201 ms
19,368 KB
testcase_09 AC 204 ms
18,548 KB
testcase_10 AC 187 ms
21,208 KB
testcase_11 AC 254 ms
19,864 KB
testcase_12 AC 179 ms
21,856 KB
testcase_13 AC 313 ms
20,540 KB
testcase_14 AC 203 ms
24,108 KB
testcase_15 AC 175 ms
17,820 KB
testcase_16 AC 247 ms
15,888 KB
testcase_17 AC 213 ms
16,820 KB
testcase_18 AC 324 ms
27,180 KB
testcase_19 AC 360 ms
33,252 KB
testcase_20 AC 360 ms
41,300 KB
testcase_21 AC 367 ms
41,452 KB
testcase_22 AC 321 ms
28,340 KB
testcase_23 AC 362 ms
41,496 KB
testcase_24 AC 327 ms
28,364 KB
testcase_25 AC 324 ms
27,732 KB
testcase_26 AC 358 ms
41,232 KB
testcase_27 AC 327 ms
28,252 KB
testcase_28 AC 352 ms
32,100 KB
testcase_29 AC 336 ms
31,788 KB
testcase_30 AC 339 ms
26,848 KB
testcase_31 AC 356 ms
41,384 KB
testcase_32 AC 374 ms
41,412 KB
testcase_33 AC 333 ms
40,368 KB
testcase_34 AC 342 ms
39,472 KB
testcase_35 AC 358 ms
28,864 KB
testcase_36 AC 359 ms
34,032 KB
testcase_37 AC 349 ms
27,252 KB
testcase_38 AC 1,135 ms
8,232 KB
testcase_39 AC 1,236 ms
8,220 KB
testcase_40 AC 265 ms
8,660 KB
testcase_41 AC 298 ms
8,680 KB
testcase_42 AC 362 ms
29,356 KB
testcase_43 AC 386 ms
29,364 KB
testcase_44 AC 326 ms
40,088 KB
testcase_45 AC 352 ms
40,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R,S,P,L=input,range,set,print,len
r,b="Red","Blue"
def J():
	return map(int,I().split())
for t in R(int(I())):
	N,M=J()
	A,B,C=S(J()),S(),S()
	for i in J():
		if i in A:A.remove(i),C.add(i)
		else:B.add(i)
	if L(A)>0 and L(B)>0 and L(C)<1:
		P("No")
		continue
	P("Yes")
	for i in A:P(r,i)
	if L(C)>0:
		i=C.pop()
		P(r,i),P(b,i)
	for i in B:P(b,i)
	c=0
	for i in C:
		if c:P(r,i),P(b,i)
		else:P(b,i),P(r,i)
		c=1-c
0