# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
689573 | tcmmichaelb139 | Mecho (IOI09_mecho) | C++17 | 98 ms | 8868 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;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
struct node {
int x, y;
int mx;
int step;
int dist;
bool operator<(const node& rhs) const {
return mx < rhs.mx;
}
};
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, s;
cin >> n >> s;
vector<vector<char>> ar(n, vector<char>(n));
pair<int, int> start, end;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++) {
cin >> ar[i][j];
if (ar[i][j] == 'M')
start = {i, j};
else if (ar[i][j] == 'D')
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |