# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
679603 | omikron123 | Mecho (IOI09_mecho) | C++14 | 258 ms | 7580 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.
// https://oj.uz/problem/view/IOI09_mecho
#include <cstdio>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstring>
#include <queue>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
// binary search + BFS
// n <= 800, s <= 1000
int n, s;
char m[805][805];
int mr,mc,dr,dc;
struct E {
int r,c,d;
};
queue<E> q;
const int INF = 1e9;
int beetime[805][805]; // time for bees to reach here
int steps[805][805]; // min steps for mecho to reach here
// init q before calling this
void bfs() {
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |