# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
104007 | Badral | Mecho (IOI09_mecho) | C++17 | 319 ms | 7900 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 pi pair<int, int>
char a[1015][1015];
int dx[] = {0, 0, 0, 1, -1, -1, 1, 1, -1};
int dy[] = {0, 1, -1, 0, 0, -1, -1, 1, 1};
int bear[1105][1015], bee[1105][1015], xx = -1, yy = -1, xxx = -1, yyy = -1, n, kk;
bool asdasd = 0;
bool can(int k) {
if ( k >= bee[xx][yy] ) return 0;
for ( int i = 1; i <= n; i++ )
for ( int j = 1; j <= n; j++ )
bear[i][j] = INT_MAX;
bear[xx][yy] = 0;
queue < pi > q;
q.push(make_pair(xx, yy));
int x, y;
while(!q.empty()) {
tie(x, y) = q.front();
q.pop();
for(int i = 1; i <= 4; i++) {
int x1 = x + dx[i], y1 = y + dy[i];
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |