結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
7,508 KB
testcase_01 AC 4 ms
7,560 KB
testcase_02 AC 5 ms
7,384 KB
testcase_03 AC 4 ms
7,340 KB
testcase_04 AC 4 ms
7,504 KB
testcase_05 AC 5 ms
7,400 KB
testcase_06 AC 4 ms
7,360 KB
testcase_07 AC 5 ms
7,364 KB
testcase_08 AC 5 ms
7,376 KB
testcase_09 AC 4 ms
7,400 KB
testcase_10 AC 5 ms
7,400 KB
testcase_11 AC 5 ms
7,384 KB
testcase_12 AC 5 ms
7,364 KB
testcase_13 AC 47 ms
7,868 KB
testcase_14 AC 54 ms
7,820 KB
testcase_15 AC 54 ms
7,640 KB
testcase_16 AC 53 ms
7,668 KB
testcase_17 AC 53 ms
7,712 KB
testcase_18 AC 52 ms
7,688 KB
testcase_19 AC 52 ms
7,724 KB
testcase_20 AC 52 ms
7,696 KB
testcase_21 AC 54 ms
7,672 KB
testcase_22 AC 54 ms
7,652 KB
testcase_23 AC 54 ms
7,688 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 a1[1d5],b1[1d5],c1[1d5],d1=1,t1;
Mint a2[1d5],b2[1d5],c2[1d5],d2=1,t2;
{
	rd(h,w,a1(h*w),q);
	b1[0..h-1]=1;
	c1[0..w-1]=1;
	b2[0..h-1]=1;
	c2[0..w-1]=1;
	rep(y,h)rep(x,w){
		if(a1[x+w*y]){
			a2[x+w*y]=a1[x+w*y];
		}else{
			a1[x+w*y]=1;
			a2[x+w*y]=2;
		}
		(b1[y],c1[x],d1)*=a1[x+w*y];
		(b2[y],c2[x],d2)*=a2[x+w*y];
	}
	rep(q){
		rd(y--,x--);
		t1=d1*a1[x+w*y]/b1[y]/c2[x];
		t2=d2*a2[x+w*y]/b2[y]/c2[x];
		wt(t1==t2?int(t1):0);
	}
}
0