Submission #18866864


Source Code Expand

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define pb push_back

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int h, w; cin >> h >> w;
	int sum = 0, m = 105;
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			int x; cin >> x;
			sum += x;
			m = min(m, x);
		}
	}
	cout << sum - m * h * w << "\n";
	return 0;
}

Submission Info

Submission Time
Task B - Blocks on Grid
User Kelly2336
Language C++ (GCC 9.2.1)
Score 200
Code Size 410 Byte
Status AC
Exec Time 8 ms
Memory 3652 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 14
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 8 ms 3476 KiB
random_02.txt AC 2 ms 3520 KiB
random_03.txt AC 2 ms 3472 KiB
random_04.txt AC 1 ms 3612 KiB
random_05.txt AC 3 ms 3540 KiB
random_06.txt AC 2 ms 3652 KiB
random_07.txt AC 2 ms 3492 KiB
random_08.txt AC 2 ms 3616 KiB
random_11.txt AC 4 ms 3544 KiB
random_12.txt AC 4 ms 3612 KiB
random_13.txt AC 3 ms 3540 KiB
sample_01.txt AC 2 ms 3608 KiB
sample_02.txt AC 2 ms 3532 KiB
sample_03.txt AC 2 ms 3636 KiB