# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
572136 | Vanilla | Mecho (IOI09_mecho) | C++17 | 309 ms | 2520 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>
typedef long long ll;
using namespace std;
const int maxn = 810;
char a [maxn][maxn];
char c [maxn][maxn];
bool vis [maxn][maxn];
bool bad [maxn][maxn];
int n,s, sx, sy, ex, ey;
queue <pair <int, int> > startq;
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, 1, 0, -1};
void propagate_bees(queue <pair <int, int> > &bee) {
int k = bee.size();
for (int i = 0; i < k; i++){
int x = bee.front().first, y = bee.front().second;
bee.pop();
for (int j = 0; j < 4; j++){
int nx = x + dx[j], ny = y + dy[j];
if (nx < 0 || nx >= n || ny < 0 || ny >= n ||
c[nx][ny] == 'T' || c[nx][ny] == 'D' || c[nx][ny] == 'H') continue;
c[nx][ny] = 'H';
bee.push({nx, ny});
}
}
}
bool check (int minutes) {
for (int i = 0; i < n; i++){
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |