# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1093929 | Trisanu_Das | Robots (APIO13_robots) | C++17 | 0 ms | 0 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;
struct DJK
{
int i;
int j;
int s;
long long w;
bool operator < (const DJK & o) const{
return w > o.w;
}
};
int n, m;
int di[4] = {-1, 0, 1, 0}, dj[4] = {0, 1, 0, -1};
long long dis[505][505][515];
pair<int, int> des[4][505][505];
char t[505][505];
queue<pair<int, int>> bfs;
priority_queue<DJK> djk;
bool visit[505][505][515];
pair<int, int> compute(int i, int j, int d)
{
if(des[d][i][j].first) return des[d][i][j];
int dd = d;
if(t[i][j] == 'A')
{
dd += 3;