結果
問題 | No.2307 [Cherry 5 th Tune *] Cool 46 |
ユーザー | sepa38 |
提出日時 | 2023-05-19 21:42:19 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 885 bytes |
コンパイル時間 | 442 ms |
コンパイル使用メモリ | 86,856 KB |
実行使用メモリ | 148,548 KB |
最終ジャッジ日時 | 2023-08-23 02:42:11 |
合計ジャッジ時間 | 29,563 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 74 ms
70,896 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | AC | 252 ms
129,940 KB |
testcase_19 | AC | 294 ms
138,244 KB |
testcase_20 | AC | 258 ms
148,336 KB |
testcase_21 | AC | 281 ms
146,568 KB |
testcase_22 | AC | 246 ms
126,360 KB |
testcase_23 | AC | 279 ms
148,016 KB |
testcase_24 | AC | 276 ms
124,840 KB |
testcase_25 | AC | 273 ms
127,012 KB |
testcase_26 | AC | 258 ms
146,872 KB |
testcase_27 | AC | 264 ms
125,528 KB |
testcase_28 | AC | 284 ms
141,704 KB |
testcase_29 | AC | 274 ms
141,180 KB |
testcase_30 | AC | 289 ms
132,424 KB |
testcase_31 | AC | 257 ms
148,268 KB |
testcase_32 | AC | 262 ms
148,548 KB |
testcase_33 | AC | 251 ms
140,004 KB |
testcase_34 | AC | 281 ms
140,004 KB |
testcase_35 | AC | 288 ms
136,260 KB |
testcase_36 | AC | 283 ms
141,036 KB |
testcase_37 | AC | 282 ms
134,712 KB |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | AC | 292 ms
79,748 KB |
testcase_42 | AC | 285 ms
137,188 KB |
testcase_43 | AC | 285 ms
137,328 KB |
testcase_44 | WA | - |
testcase_45 | WA | - |
ソースコード
for _ in range(int(input())): n, m = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) sa = set(a) sb = set(b) flg = 1 for v in sa: if v in sb: flg = 0 break if flg: if n or m: for v in a: print("Red", v) for v in b: print("Blue", v) continue print("No") continue print("Yes") a1 = [] a2 = [] for v in a: if v in sb: a1.append(v) else: a2.append(v) b1 = [] b2 = [] for v in b: if v in sa: b1.append(v) else: b2.append(v) a1.sort() for v in a2: print("Red", v) x = a1.pop() print("Red", x) print("Blue", x) for v in b2: print("Blue", v) flg = 1 for v in a1: if flg: print("Blue", v) print("Red", v) else: print("Red", v) print("Blue", v) flg ^= 1