結果

問題 No.1141 田グリッド
ユーザー tailstails
提出日時 2020-07-31 22:04:28
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 367 bytes
コンパイル時間 2,697 ms
コンパイル使用メモリ 175,560 KB
実行使用メモリ 6,140 KB
最終ジャッジ日時 2023-09-19 00:53:22
合計ジャッジ時間 5,140 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,536 KB
testcase_01 AC 3 ms
4,492 KB
testcase_02 AC 3 ms
4,520 KB
testcase_03 AC 2 ms
4,636 KB
testcase_04 AC 3 ms
4,576 KB
testcase_05 AC 3 ms
4,716 KB
testcase_06 AC 3 ms
4,556 KB
testcase_07 AC 3 ms
4,496 KB
testcase_08 AC 3 ms
4,680 KB
testcase_09 AC 3 ms
4,712 KB
testcase_10 AC 3 ms
4,640 KB
testcase_11 AC 3 ms
4,588 KB
testcase_12 AC 4 ms
4,596 KB
testcase_13 AC 29 ms
6,028 KB
testcase_14 AC 33 ms
6,140 KB
testcase_15 AC 32 ms
6,036 KB
testcase_16 AC 32 ms
6,020 KB
testcase_17 AC 31 ms
6,140 KB
testcase_18 AC 7 ms
5,620 KB
testcase_19 AC 7 ms
5,676 KB
testcase_20 AC 7 ms
5,668 KB
testcase_21 AC 32 ms
6,032 KB
testcase_22 AC 31 ms
6,028 KB
testcase_23 AC 32 ms
6,016 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

ll h,w,q,x,y,xx=-1,yy=-1;
Mint a[1d5],b[1d5],c[1d5],d=1,t;
{
	rd(h,w,a(h*w),q);
	b[0..h-1]=1;
	c[0..w-1]=1;
	rep(y,h)rep(x,w){
		t=a[x+w*y];
		if(t){
			(b[y],c[x],d)*=a[x+w*y];
		}else{
			xx=xx==x||xx==-1?x:-2;
			yy=yy==y||yy==-1?y:-2;
		}
	}
	rep(q){
		rd(y--,x--);
		if((xx==x||xx==-1)&&(yy==y||yy==-1)){
			wt(d*a[x+w*y]/b[y]/c[x]);
		}else{
			wt(0);
		}
	}
}
0