結果
問題 | No.2307 [Cherry 5 th Tune *] Cool 46 |
ユーザー | aaaaaaaaaa2230 |
提出日時 | 2023-05-19 22:37:00 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 951 bytes |
コンパイル時間 | 780 ms |
コンパイル使用メモリ | 10,848 KB |
実行使用メモリ | 35,828 KB |
最終ジャッジ日時 | 2023-08-23 03:48:05 |
合計ジャッジ時間 | 30,345 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 16 ms
7,996 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 165 ms
18,344 KB |
testcase_09 | WA | - |
testcase_10 | AC | 151 ms
19,788 KB |
testcase_11 | AC | 196 ms
19,608 KB |
testcase_12 | AC | 139 ms
18,352 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | AC | 247 ms
26,360 KB |
testcase_19 | AC | 293 ms
30,892 KB |
testcase_20 | AC | 264 ms
35,748 KB |
testcase_21 | AC | 270 ms
35,828 KB |
testcase_22 | AC | 246 ms
25,596 KB |
testcase_23 | AC | 263 ms
35,616 KB |
testcase_24 | AC | 264 ms
25,636 KB |
testcase_25 | AC | 251 ms
27,284 KB |
testcase_26 | AC | 255 ms
35,412 KB |
testcase_27 | AC | 250 ms
25,564 KB |
testcase_28 | AC | 261 ms
29,216 KB |
testcase_29 | AC | 260 ms
29,416 KB |
testcase_30 | AC | 271 ms
26,692 KB |
testcase_31 | AC | 256 ms
35,748 KB |
testcase_32 | AC | 262 ms
35,780 KB |
testcase_33 | AC | 234 ms
33,776 KB |
testcase_34 | AC | 254 ms
31,336 KB |
testcase_35 | AC | 277 ms
30,164 KB |
testcase_36 | AC | 270 ms
34,528 KB |
testcase_37 | AC | 256 ms
30,276 KB |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | AC | 223 ms
8,676 KB |
testcase_42 | AC | 277 ms
30,044 KB |
testcase_43 | AC | 282 ms
29,968 KB |
testcase_44 | WA | - |
testcase_45 | WA | - |
ソースコード
def solve(): n,m = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) sA = set(A) sB = set(B) sames = [] for b in B: if b in sA: sames.append(b) if n == 0 or m == 0: for a in A: print(f"Red {a}") for b in B: print(f"Blue {b}") return if sames == []: print("No") return print("Yes") for a in A: if a not in sB: print(f"Red {a}") l = sames.pop() print(f"Red {l}") print(f"Blue {l}") for b in B: if b not in sA: print(f"Blue {b}") for i,l in enumerate(sames): if i%2: print(f"Red {l}") print(f"Blue {l}") else: print(f"Blue {l}") print(f"Red {l}") return t = int(input()) for _ in range(t): solve()