結果

問題 No.1896 Arrays and XOR Procedure 2
ユーザー tailstails
提出日時 2022-04-08 23:07:25
言語 cLay
(20231016-1)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 595 bytes
コンパイル時間 2,383 ms
コンパイル使用メモリ 170,628 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-19 01:42:10
合計ジャッジ時間 7,440 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 2 ms
4,384 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 2 ms
4,380 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 AC 2 ms
4,380 KB
testcase_28 AC 1 ms
4,380 KB
testcase_29 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll a[3d3],b[];

VI res;
void ent(ll t,ll p,ll q){
	res.push_back(t);
	res.push_back(p+1);
	res.push_back(q+1);
	ll x=a[p]^b[q];
	(t==1?a[p]:b[q])=x;
}

{
	ll@n;
	rd(a(n),b(n));
	ll am=argmax[i,0,n](a[i]);
	ll bm=argmax[i,0,n](b[i]);
	if(a[am]>b[bm]){
		ent(1,am,bm);
		ent(2,am,bm);
		ent(1,am,bm);
	}
	rep(i,n){
		if(a[i]>(a[i]^b[bm])){
			ent(1,i,bm);
		}
	}
	ent(1,0,bm);
	ent(2,0,bm);
	ent(1,0,bm);
	rep(i,n){
		if(i!=bm&&b[i]<(b[i]^a[0])){
			ent(2,0,i);
		}
	}
	ent(1,0,bm);
	ent(2,0,bm);
	ent(1,0,bm);
	wt((ll)(res.size()/3));
	rep(i,0,res.size(),3){
		wt(res[i],res[i+1],res[i+2]);
	}
}
0