# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
100304 | naoai | Bomb (IZhO17_bomb) | C++14 | 642 ms | 68088 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define fin cin
#define fout cout
//ifstream fin("x.in"); ofstream fout("x.out");
const int nmax = 2500 + 5;
const int inf = 1 << 30;
int n, m;
int v[nmax + 1][nmax + 1];
int u[nmax + 1][nmax + 1];
int w[nmax + 1];
int st[nmax + 1][nmax + 1], dr[nmax + 1][nmax + 1];
string s[nmax + 1];
void check (int h, int w) {
for (int i = 1; i <= n; ++ i) {
for (int j = 1; j <= m; ++ j) {
v[i][j] = v[i - 1][j] + v[i][j - 1] - v[i - 1][j - 1] + (s[i][j - 1] - '0');
}
}
bool ok = 1;
for (int i = 1; i <= n - h + 1; ++ i) {
for (int j = 1; j <= m - w + 1; ++ j) {
int sum = v[i + h - 1][j + w - 1] - v[i - 1][j + w - 1] - v[i + h - 1][j - 1] + v[i - 1][j - 1];
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |