# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
408689 | Jasiekstrz | Mecho (IOI09_mecho) | C++17 | 438 ms | 8864 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>
#define fi first
#define se second
using namespace std;
const int INF=1e9+7;
const int N=800;
struct Pos
{
int x,y;
Pos(int _x=0,int _y=0) : x(_x), y(_y) {};
bool operator==(const Pos &oth)
{
return (x==oth.x && y==oth.y);
}
vector<Pos> edges()
{
vector<Pos> tmp;
tmp.reserve(4);
for(auto dd:{make_pair(0,-1),make_pair(0,1),make_pair(-1,0),make_pair(1,0)})
tmp.push_back({x+dd.fi,y+dd.se});
return tmp;
}
};
bool fr[N+10][N+10];
queue<Pos> qq;
int bt[N+10][N+10];
pair<int,int> d[N+10][N+10];
bool ok(Pos start,Pos finish,int s,int time,int n)
{
for(int i=1;i<=n;i++)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |