結果

問題 No.2456 Stamp Art
ユーザー tailstails
提出日時 2023-09-01 23:19:02
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 818 bytes
コンパイル時間 4,695 ms
コンパイル使用メモリ 175,268 KB
実行使用メモリ 133,512 KB
最終ジャッジ日時 2023-09-01 23:19:11
合計ジャッジ時間 6,917 ms
ジャッジサーバーID
(参考情報)
judge14 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 126 ms
133,476 KB
testcase_04 AC 2 ms
4,384 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 125 ms
133,400 KB
testcase_07 AC 81 ms
133,340 KB
testcase_08 AC 92 ms
133,360 KB
testcase_09 AC 113 ms
133,420 KB
testcase_10 AC 122 ms
133,340 KB
testcase_11 AC 121 ms
133,480 KB
testcase_12 AC 121 ms
133,400 KB
testcase_13 WA -
testcase_14 AC 150 ms
133,468 KB
testcase_15 AC 122 ms
133,340 KB
testcase_16 AC 61 ms
69,228 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 83 ms
90,264 KB
testcase_20 AC 123 ms
133,324 KB
testcase_21 AC 98 ms
121,164 KB
testcase_22 AC 113 ms
133,392 KB
testcase_23 AC 9 ms
10,212 KB
testcase_24 AC 13 ms
14,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@h,@w,z=h,d=4,a[d][h+2][w+2]{};
string@s[h];

rep(y,h){
	rep(x,w){
		ll b=0;
		if(s[y][x]=='#'){
			b=h;
			b<?=a[0][y+0][x+1];
			b<?=a[0][y+1][x+0];
			b<?=a[0][y+0][x+0];
			b+=1;
		}
		a[0][y+1][x+1]=b;
	}
}

rep(y,h){
	rrep(x,w){
		ll b=0;
		if(s[y][x]=='#'){
			b=h;
			b<?=a[1][y+0][x+1];
			b<?=a[1][y+1][x+2];
			b<?=a[1][y+0][x+2];
			b+=1;
		}
		a[1][y+1][x+1]=b;
	}
}

rrep(y,h){
	rep(x,w){
		ll b=0;
		if(s[y][x]=='#'){
			b=h;
			b<?=a[2][y+2][x+1];
			b<?=a[2][y+1][x+0];
			b<?=a[2][y+2][x+0];
			b+=1;
		}
		a[2][y+1][x+1]=b;
	}
}

rrep(y,h){
	rrep(x,w){
		ll b=0;
		if(s[y][x]=='#'){
			b=h;
			b<?=a[3][y+2][x+1];
			b<?=a[3][y+1][x+2];
			b<?=a[3][y+2][x+2];
			b+=1;
		}
		a[3][y+1][x+1]=b;
	}
}

wt(min[y,0,h,x,0,w@s[y][x]=='#'](a[0][y+1][x+1]+a[1][y+1][x+1]+a[2][y+1][x+1]+a[3][y+1][x+1]-3));
0