# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
228801 | osaaateiasavtnl | Mecho (IOI09_mecho) | C++14 | 243 ms | 17232 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 int long long
#define ii pair <int, int>
#define app push_back
#define all(a) a.begin(), a.end()
#define bp __builtin_popcount
#define ll long long
#define mp make_pair
#define f first
#define s second
#define Time (double)clock()/CLOCKS_PER_SEC
const int N = 1007, INF = 1e9 + 7;
int n, S;
string a[N];
int bee_dist[N][N];
bool can_bee(int i, int j) {
return 0 <= i && i < n && 0 <= j && j < n && (a[i][j] == 'G' || a[i][j] == 'M' || a[i][j] == 'H');
}
vector <ii> v = { {0, -1}, {0, 1}, {-1, 0}, {1, 0} };
void bfs1() {
for (int i = 0; i < N; ++i) {
for (int j = 0; j < N; ++j) {
bee_dist[i][j] = INF;
}
}
queue <ii> q;
for (int i = 0; i < n; ++i) {
for (int j = 0; j < n; ++j) {
if (a[i][j] == 'H') {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |