結果

問題 No.2662 Installing Cell Towers
ユーザー tailstails
提出日時 2024-03-06 15:50:45
言語 cLay
(20240104-1)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 5,093 ms
コンパイル使用メモリ 173,136 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-03-06 15:50:56
合計ジャッジ時間 6,879 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 1 ms
6,676 KB
testcase_03 AC 2 ms
6,676 KB
testcase_04 AC 2 ms
6,676 KB
testcase_05 AC 10 ms
6,676 KB
testcase_06 AC 5 ms
6,676 KB
testcase_07 AC 1 ms
6,676 KB
testcase_08 AC 4 ms
6,676 KB
testcase_09 AC 2 ms
6,676 KB
testcase_10 AC 11 ms
6,676 KB
testcase_11 AC 10 ms
6,676 KB
testcase_12 AC 2 ms
6,676 KB
testcase_13 AC 5 ms
6,676 KB
testcase_14 AC 11 ms
6,676 KB
testcase_15 AC 7 ms
6,676 KB
testcase_16 AC 2 ms
6,676 KB
testcase_17 AC 12 ms
6,676 KB
testcase_18 AC 12 ms
6,676 KB
testcase_19 AC 1 ms
6,676 KB
testcase_20 AC 1 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@m,b[n]{},a=0,c=0;
rep(i,m){
	ll@p--,@q;
	if(p-q<0){
		a+=-(p-q);
		b[0]+=1;
	}else{
		b[p-q]+=1;
	}
	b[p]+=-2;
	if(p+q<n){
		b[p+q]+=1;
	}
}
rep(x,n){
	wtSp(a);
	a+=c+=b[x];
}
0