結果
問題 | No.2307 [Cherry 5 th Tune *] Cool 46 |
ユーザー |
👑 |
提出日時 | 2023-05-20 16:56:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 1,405 ms / 2,000 ms |
コード長 | 422 bytes |
コンパイル時間 | 409 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 44,040 KB |
最終ジャッジ日時 | 2024-12-21 11:38:41 |
合計ジャッジ時間 | 36,681 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 46 |
ソースコード
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