結果

問題 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,466 ms / 2,000 ms
コード長 422 bytes
コンパイル時間 317 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 44,036 KB
最終ジャッジ日時 2024-06-01 07:22:54
合計ジャッジ時間 39,689 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,752 KB
testcase_01 AC 30 ms
10,752 KB
testcase_02 AC 291 ms
10,880 KB
testcase_03 AC 231 ms
12,860 KB
testcase_04 AC 238 ms
13,072 KB
testcase_05 AC 227 ms
12,676 KB
testcase_06 AC 231 ms
12,844 KB
testcase_07 AC 200 ms
13,460 KB
testcase_08 AC 262 ms
21,636 KB
testcase_09 AC 253 ms
20,256 KB
testcase_10 AC 244 ms
23,952 KB
testcase_11 AC 320 ms
21,348 KB
testcase_12 AC 229 ms
24,872 KB
testcase_13 AC 392 ms
22,784 KB
testcase_14 AC 261 ms
26,572 KB
testcase_15 AC 217 ms
19,640 KB
testcase_16 AC 308 ms
18,540 KB
testcase_17 AC 263 ms
19,592 KB
testcase_18 AC 408 ms
29,648 KB
testcase_19 AC 481 ms
35,932 KB
testcase_20 AC 454 ms
43,852 KB
testcase_21 AC 460 ms
43,904 KB
testcase_22 AC 410 ms
30,660 KB
testcase_23 AC 469 ms
44,036 KB
testcase_24 AC 413 ms
30,964 KB
testcase_25 AC 413 ms
30,356 KB
testcase_26 AC 451 ms
43,720 KB
testcase_27 AC 416 ms
30,952 KB
testcase_28 AC 434 ms
34,800 KB
testcase_29 AC 426 ms
34,076 KB
testcase_30 AC 434 ms
29,340 KB
testcase_31 AC 459 ms
43,860 KB
testcase_32 AC 470 ms
43,828 KB
testcase_33 AC 409 ms
42,860 KB
testcase_34 AC 416 ms
41,980 KB
testcase_35 AC 440 ms
31,372 KB
testcase_36 AC 455 ms
36,272 KB
testcase_37 AC 422 ms
29,668 KB
testcase_38 AC 1,371 ms
10,752 KB
testcase_39 AC 1,466 ms
10,752 KB
testcase_40 AC 349 ms
11,264 KB
testcase_41 AC 374 ms
10,880 KB
testcase_42 AC 441 ms
31,692 KB
testcase_43 AC 438 ms
31,880 KB
testcase_44 AC 402 ms
42,628 KB
testcase_45 AC 445 ms
42,628 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