# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
103946 | Bodo171 | Golf (JOI17_golf) | C++14 | 577 ms | 187828 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 <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <map>
using namespace std;
const int kmax=100005;
const int nmax=2010;
struct state
{
int l,c,dir;
};
vector<state> L[4*nmax];
vector<int> norm_x,norm_y;
map<int,int> mX,mY;
int X1[kmax],X2[nmax],Y1[kmax],Y2[kmax];
int v[nmax][nmax];
int d[nmax][nmax][4];
int d1[]={-1,0,1,0};
int d2[]={0,-1,0,1};
int n,k,i,j,dir,l1,c1,l2,c2,li,ci,di,lf,cf,df;
void prp(int l,int c,int dd,int cost_nou)
{
if(l<1||c<1||l>n||c>n) return;
if(cost_nou<d[l][c][dd])
{
d[l][c][dd]=cost_nou;
L[cost_nou].push_back({l,c,dd});
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |