結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,768 KB
testcase_01 AC 16 ms
7,764 KB
testcase_02 AC 234 ms
8,240 KB
testcase_03 AC 182 ms
10,392 KB
testcase_04 AC 191 ms
10,724 KB
testcase_05 AC 180 ms
9,924 KB
testcase_06 AC 182 ms
10,264 KB
testcase_07 AC 156 ms
10,836 KB
testcase_08 AC 209 ms
19,280 KB
testcase_09 AC 208 ms
18,564 KB
testcase_10 AC 199 ms
21,140 KB
testcase_11 AC 262 ms
19,992 KB
testcase_12 AC 188 ms
22,104 KB
testcase_13 AC 326 ms
20,916 KB
testcase_14 AC 208 ms
23,980 KB
testcase_15 AC 185 ms
16,988 KB
testcase_16 AC 256 ms
15,984 KB
testcase_17 AC 222 ms
16,876 KB
testcase_18 AC 334 ms
27,024 KB
testcase_19 AC 375 ms
33,244 KB
testcase_20 AC 382 ms
41,292 KB
testcase_21 AC 383 ms
41,280 KB
testcase_22 AC 333 ms
28,208 KB
testcase_23 AC 386 ms
41,308 KB
testcase_24 AC 344 ms
28,404 KB
testcase_25 AC 344 ms
27,672 KB
testcase_26 AC 377 ms
41,196 KB
testcase_27 AC 335 ms
28,324 KB
testcase_28 AC 365 ms
32,040 KB
testcase_29 AC 357 ms
31,672 KB
testcase_30 AC 356 ms
26,856 KB
testcase_31 AC 378 ms
41,304 KB
testcase_32 AC 381 ms
41,244 KB
testcase_33 AC 331 ms
40,368 KB
testcase_34 AC 347 ms
39,412 KB
testcase_35 AC 366 ms
28,876 KB
testcase_36 AC 380 ms
34,080 KB
testcase_37 AC 353 ms
27,336 KB
testcase_38 AC 1,150 ms
7,956 KB
testcase_39 AC 1,259 ms
7,832 KB
testcase_40 AC 272 ms
8,640 KB
testcase_41 AC 307 ms
8,512 KB
testcase_42 AC 370 ms
29,484 KB
testcase_43 AC 370 ms
29,336 KB
testcase_44 AC 334 ms
40,260 KB
testcase_45 AC 375 ms
40,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R,S,P=input,range,set,print
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 len(A)>0 and len(B)>0 and len(C)<1:
		P("No")
		continue
	P("Yes")
	for i in A:P(r,i)
	if len(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<1:P(b,i),P(r,i)
		else:P(r,i),P(b,i)
		c=1-c
0