Submission #31375758
Source Code Expand
h, w = map(int, input().split())
a = [[] for i in range(h)]
for i in range(h):
a[i] = list(map(int, input().split()))
minimum = 100
for i in range(h):
for j in range(w):
if minimum > a[i][j]:
minimum = a[i][j]
answer = 0
for i in range(h):
for j in range(w):
answer += a[i][j] - minimum
print(answer)
Submission Info
| Submission Time | |
|---|---|
| Task | B - Blocks on Grid |
| User | Pro_ktmr |
| Language | PyPy3 (7.3.0) |
| Score | 200 |
| Code Size | 353 Byte |
| Status | AC |
| Exec Time | 72 ms |
| Memory | 68480 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_11.txt, random_12.txt, random_13.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| random_01.txt | AC | 72 ms | 68372 KiB |
| random_02.txt | AC | 53 ms | 62032 KiB |
| random_03.txt | AC | 53 ms | 62640 KiB |
| random_04.txt | AC | 51 ms | 61848 KiB |
| random_05.txt | AC | 54 ms | 62688 KiB |
| random_06.txt | AC | 53 ms | 62740 KiB |
| random_07.txt | AC | 56 ms | 62748 KiB |
| random_08.txt | AC | 48 ms | 64116 KiB |
| random_11.txt | AC | 60 ms | 68480 KiB |
| random_12.txt | AC | 59 ms | 68220 KiB |
| random_13.txt | AC | 57 ms | 68400 KiB |
| sample_01.txt | AC | 54 ms | 61724 KiB |
| sample_02.txt | AC | 51 ms | 62004 KiB |
| sample_03.txt | AC | 49 ms | 61976 KiB |