結果

問題 No.2657 Falling Block Game
ユーザー tailstails
提出日時 2024-03-02 15:10:33
言語 cLay
(20240104-1)
結果
AC  
実行時間 14 ms / 2,000 ms
コード長 554 bytes
コンパイル時間 4,810 ms
コンパイル使用メモリ 177,048 KB
実行使用メモリ 11,200 KB
最終ジャッジ日時 2024-03-02 15:10:41
合計ジャッジ時間 7,106 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,616 KB
testcase_01 AC 2 ms
7,616 KB
testcase_02 AC 2 ms
7,616 KB
testcase_03 AC 2 ms
7,616 KB
testcase_04 AC 8 ms
10,816 KB
testcase_05 AC 12 ms
11,128 KB
testcase_06 AC 9 ms
9,648 KB
testcase_07 AC 10 ms
10,768 KB
testcase_08 AC 9 ms
8,512 KB
testcase_09 AC 13 ms
11,200 KB
testcase_10 AC 10 ms
10,864 KB
testcase_11 AC 10 ms
10,856 KB
testcase_12 AC 11 ms
10,980 KB
testcase_13 AC 11 ms
10,872 KB
testcase_14 AC 10 ms
10,864 KB
testcase_15 AC 10 ms
10,876 KB
testcase_16 AC 10 ms
10,860 KB
testcase_17 AC 10 ms
10,868 KB
testcase_18 AC 11 ms
10,868 KB
testcase_19 AC 11 ms
10,860 KB
testcase_20 AC 13 ms
8,512 KB
testcase_21 AC 13 ms
8,512 KB
testcase_22 AC 13 ms
8,512 KB
testcase_23 AC 13 ms
8,512 KB
testcase_24 AC 13 ms
8,512 KB
testcase_25 AC 13 ms
8,512 KB
testcase_26 AC 13 ms
8,512 KB
testcase_27 AC 13 ms
8,512 KB
testcase_28 AC 13 ms
8,512 KB
testcase_29 AC 13 ms
8,512 KB
testcase_30 AC 13 ms
11,200 KB
testcase_31 AC 13 ms
11,200 KB
testcase_32 AC 12 ms
11,200 KB
testcase_33 AC 13 ms
11,200 KB
testcase_34 AC 14 ms
11,200 KB
testcase_35 AC 13 ms
11,200 KB
testcase_36 AC 13 ms
11,200 KB
testcase_37 AC 13 ms
11,200 KB
testcase_38 AC 12 ms
11,200 KB
testcase_39 AC 13 ms
11,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@h,@w,a[w]{},b[w],q[w];
string@s[h];
rrep(y,h-1){
	ll qr=0,qw=-1;
	rep(x,w){
		if(s[y][x]=='#'){
			qr=0,qw=-1;
			b[x]=w;
		}else{
			while(qr<=qw&&a[q[qw]]>=a[x]){
				--qw;
			}
			q[++qw]=x;
			while(qr<qw&&x-q[qr]>=a[q[qr+1]]){
				++qr;
			}
			b[x]=max(x-q[qr],a[q[qr]]);
		}
	}
	qr=0,qw=-1;
	rrep(x,w){
		if(s[y][x]=='#'){
			qr=0,qw=-1;
		}else{
			while(qr<=qw&&a[q[qw]]>=a[x]){
				--qw;
			}
			q[++qw]=x;
			while(qr<qw&&q[qr]-x>=a[q[qr+1]]){
				++qr;
			}
			b[x]<?=max(q[qr]-x,a[q[qr]]);
		}
	}
	rep(x,w){
		a[x]=b[x];
	}
}
wtLn(a(w));
0