結果

問題 No.1141 田グリッド
ユーザー masuyuumasuyuu
提出日時 2020-11-15 22:08:58
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 619 bytes
コンパイル時間 2,011 ms
コンパイル使用メモリ 70,972 KB
実行使用メモリ 70,296 KB
最終ジャッジ日時 2023-09-30 07:07:33
合計ジャッジ時間 8,008 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
60,356 KB
testcase_01 AC 115 ms
55,712 KB
testcase_02 AC 111 ms
55,448 KB
testcase_03 AC 115 ms
55,984 KB
testcase_04 AC 114 ms
55,668 KB
testcase_05 AC 115 ms
55,900 KB
testcase_06 AC 115 ms
56,020 KB
testcase_07 AC 117 ms
55,804 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int y = sc.nextInt();
		int[][] a = new int[x][y];
		for(int i=0;i<x;i++) {
			for(int j=0;j<y;j++) {
				a[i][j]=sc.nextInt();
			}
		}
		int k = sc.nextInt();
		int cnt=0;
		for(int i=0;i<k;i++) {
			long sum =1;
			int aa = sc.nextInt();
			int bb = sc.nextInt();

			for(int j=0;j<x;j++) {
				for(int h=0;h<y;h++) {
					if(j==aa-1|h==bb-1) {

					}else {
						sum*=a[j][h];
						cnt++;
					}
				}
			}
			sum%=1000000007;
			System.out.println(sum);
		}



	}
}
0