結果

問題 No.1558 Derby Live
ユーザー tailstails
提出日時 2021-06-25 22:05:09
言語 cLay
(20231016-1)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 396 bytes
コンパイル時間 4,117 ms
コンパイル使用メモリ 193,256 KB
実行使用メモリ 17,804 KB
最終ジャッジ日時 2023-09-19 02:29:05
合計ジャッジ時間 12,224 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
15,880 KB
testcase_01 AC 91 ms
17,804 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 43 ms
6,272 KB
testcase_04 AC 35 ms
11,388 KB
testcase_05 AC 43 ms
12,028 KB
testcase_06 AC 59 ms
10,696 KB
testcase_07 AC 4 ms
4,436 KB
testcase_08 AC 66 ms
15,856 KB
testcase_09 AC 66 ms
16,268 KB
testcase_10 AC 66 ms
16,592 KB
testcase_11 AC 68 ms
16,320 KB
testcase_12 AC 71 ms
16,756 KB
testcase_13 AC 73 ms
16,864 KB
testcase_14 AC 74 ms
17,096 KB
testcase_15 AC 74 ms
17,068 KB
testcase_16 AC 77 ms
17,156 KB
testcase_17 AC 81 ms
17,476 KB
testcase_18 AC 80 ms
17,552 KB
testcase_19 AC 84 ms
17,600 KB
testcase_20 AC 88 ms
17,532 KB
testcase_21 AC 82 ms
17,480 KB
testcase_22 AC 85 ms
17,600 KB
testcase_23 AC 85 ms
17,588 KB
testcase_24 AC 83 ms
17,508 KB
testcase_25 AC 84 ms
17,532 KB
testcase_26 AC 89 ms
17,632 KB
testcase_27 AC 84 ms
17,556 KB
testcase_28 AC 84 ms
17,624 KB
testcase_29 AC 86 ms
17,640 KB
testcase_30 AC 81 ms
17,544 KB
testcase_31 AC 84 ms
17,528 KB
testcase_32 AC 84 ms
17,628 KB
testcase_33 AC 1 ms
4,380 KB
testcase_34 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

{
	ll@n,@m,@q;
	segtree_Point_Prod<Permutation> t;
	t.walloc(m,1);
	rep(q){
		ll@a;
		if(a==1){
			ll@d;
			Permutation p(n);
			rd(p(n)--);
			t.change(m-d,p);
		}
		if(a==2){
			ll@s;
			Permutation p=t.getProd(m-s,m);
			VI x(n);
			x[0..n-1]=(1..);
			p.apply(x.data());
			wt(x(n));
		}
		if(a==3){
			ll@l,@r;
			Permutation p=t.getProd(m-r,m-l+1);
			wt(sum[i,0,n](abs(p[i]-i)));
		}
	}
}
0