結果
問題 | No.1141 田グリッド |
ユーザー | renand_nari |
提出日時 | 2020-07-31 22:32:12 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 465 bytes |
コンパイル時間 | 260 ms |
コンパイル使用メモリ | 87,064 KB |
実行使用メモリ | 264,976 KB |
最終ジャッジ日時 | 2023-09-21 00:58:35 |
合計ジャッジ時間 | 6,127 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 73 ms
71,204 KB |
testcase_01 | AC | 72 ms
71,216 KB |
testcase_02 | AC | 73 ms
71,308 KB |
testcase_03 | AC | 73 ms
71,440 KB |
testcase_04 | AC | 71 ms
71,500 KB |
testcase_05 | AC | 72 ms
71,320 KB |
testcase_06 | AC | 74 ms
71,300 KB |
testcase_07 | AC | 72 ms
71,444 KB |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | RE | - |
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 | -- | - |
ソースコード
MOD=10**9+7 h,w=map(int, input().split()) gyou = [1]*h retu = [1]*w grid = [] tmp = 1 for i in range(h): A=[int(k) for k in input().split()] grid.append(A) for j in A: gyou[i] *= j tmp*=j for x in range(w): for y in range(h): retu[x] *= grid[y][x] q = int(input()) res = [] for i in range(q): r,c=map(int, input().split()) res.append(int(tmp*grid[r-1][c-1]/(gyou[r-1]*retu[c-1]))) for i in res: print(i%MOD)