結果

問題 No.1141 田グリッド
ユーザー tailstails
提出日時 2020-07-31 22:23:37
言語 cLay
(20240104-1)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 469 bytes
コンパイル時間 2,977 ms
コンパイル使用メモリ 177,296 KB
実行使用メモリ 7,956 KB
最終ジャッジ日時 2023-09-19 00:53:58
合計ジャッジ時間 6,007 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
7,612 KB
testcase_01 AC 4 ms
7,568 KB
testcase_02 AC 4 ms
7,408 KB
testcase_03 AC 4 ms
7,504 KB
testcase_04 AC 5 ms
7,420 KB
testcase_05 AC 4 ms
7,500 KB
testcase_06 AC 4 ms
7,464 KB
testcase_07 AC 5 ms
7,404 KB
testcase_08 AC 4 ms
7,444 KB
testcase_09 AC 5 ms
7,500 KB
testcase_10 AC 4 ms
7,424 KB
testcase_11 AC 4 ms
7,420 KB
testcase_12 AC 4 ms
7,640 KB
testcase_13 AC 49 ms
7,760 KB
testcase_14 AC 55 ms
7,728 KB
testcase_15 AC 55 ms
7,728 KB
testcase_16 AC 54 ms
7,956 KB
testcase_17 AC 53 ms
7,712 KB
testcase_18 AC 53 ms
7,788 KB
testcase_19 AC 53 ms
7,748 KB
testcase_20 AC 52 ms
7,744 KB
testcase_21 AC 54 ms
7,780 KB
testcase_22 AC 54 ms
7,744 KB
testcase_23 AC 53 ms
7,736 KB
testcase_24 AC 53 ms
7,728 KB
testcase_25 AC 51 ms
7,788 KB
testcase_26 AC 52 ms
7,740 KB
testcase_27 AC 52 ms
7,760 KB
testcase_28 AC 52 ms
7,756 KB
testcase_29 AC 52 ms
7,812 KB
testcase_30 AC 52 ms
7,724 KB
testcase_31 AC 53 ms
7,740 KB
testcase_32 AC 52 ms
7,804 KB
testcase_33 AC 52 ms
7,744 KB
権限があれば一括ダウンロードができます

ソースコード

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]/c1[x];
		t2=d2*a2[x+w*y]/b2[y]/c2[x];
		wt(t1==t2?int(t1):0);
	}
}
0