結果

問題 No.2307 [Cherry 5 th Tune *] Cool 46
ユーザー tailstails
提出日時 2023-05-19 21:45:31
言語 cLay
(20240104-1)
結果
AC  
実行時間 203 ms / 2,000 ms
コード長 722 bytes
コンパイル時間 3,385 ms
コンパイル使用メモリ 175,140 KB
実行使用メモリ 14,900 KB
最終ジャッジ日時 2023-08-23 02:52:14
合計ジャッジ時間 31,234 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 41 ms
5,380 KB
testcase_03 AC 60 ms
5,916 KB
testcase_04 AC 62 ms
5,860 KB
testcase_05 AC 65 ms
5,912 KB
testcase_06 AC 61 ms
5,928 KB
testcase_07 AC 61 ms
5,808 KB
testcase_08 AC 97 ms
8,788 KB
testcase_09 AC 95 ms
9,328 KB
testcase_10 AC 106 ms
9,520 KB
testcase_11 AC 104 ms
8,328 KB
testcase_12 AC 87 ms
8,852 KB
testcase_13 AC 123 ms
9,492 KB
testcase_14 AC 89 ms
9,656 KB
testcase_15 AC 92 ms
7,980 KB
testcase_16 AC 91 ms
7,600 KB
testcase_17 AC 102 ms
8,764 KB
testcase_18 AC 142 ms
14,900 KB
testcase_19 AC 146 ms
11,072 KB
testcase_20 AC 201 ms
14,828 KB
testcase_21 AC 198 ms
13,980 KB
testcase_22 AC 166 ms
14,856 KB
testcase_23 AC 193 ms
14,368 KB
testcase_24 AC 166 ms
13,192 KB
testcase_25 AC 168 ms
13,896 KB
testcase_26 AC 198 ms
14,892 KB
testcase_27 AC 154 ms
14,220 KB
testcase_28 AC 193 ms
14,232 KB
testcase_29 AC 203 ms
14,612 KB
testcase_30 AC 167 ms
11,584 KB
testcase_31 AC 190 ms
14,828 KB
testcase_32 AC 189 ms
14,844 KB
testcase_33 AC 144 ms
14,896 KB
testcase_34 AC 137 ms
13,736 KB
testcase_35 AC 151 ms
11,444 KB
testcase_36 AC 178 ms
13,540 KB
testcase_37 AC 172 ms
14,188 KB
testcase_38 AC 14 ms
5,452 KB
testcase_39 AC 25 ms
5,524 KB
testcase_40 AC 49 ms
5,452 KB
testcase_41 AC 58 ms
5,556 KB
testcase_42 AC 163 ms
10,284 KB
testcase_43 AC 161 ms
10,216 KB
testcase_44 AC 145 ms
14,840 KB
testcase_45 AC 148 ms
14,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@t;
rep(t){
	set<ll>x,y,z;
	ll@n,@m;
	rep(n){
		ll@a;
		x.insert(a);
	}
	rep(m){
		ll@a;
		if(x.count(a)){
			x.erase(a);
			z.insert(a);
		}else{
			y.insert(a);
		}
	}
	if(z.empty()&&!x.empty()&&!y.empty()){
		wt("No");
	}else{
		wt("Yes");
		ll u=n<m;
		while(!x.empty()||!y.empty()||!z.empty()){
			if(u){
				while(!y.empty()){
					ll a=*y.begin();
					y.erase(a);
					wt("Blue",a);
				}
				if(!z.empty()){
					ll a=*z.begin();
					z.erase(a);
					wt("Blue",a);
					wt("Red",a);
				}
			}else{
				while(!x.empty()){
					ll a=*x.begin();
					x.erase(a);
					wt("Red",a);
				}
				if(!z.empty()){
					ll a=*z.begin();
					z.erase(a);
					wt("Red",a);
					wt("Blue",a);
				}
			}
			u=!u;
		}
	}
}
0