제출 #242018

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
2420182020-06-26 14:22:29AutoratchMecho (IOI09_mecho)C++14
100 / 100
252 ms4600 KiB
#include <bits/stdc++.h>
using namespace std;
const int N = 801;
int n,s,sx,sy,tx,ty;
char c[N][N];
int bee[N][N];
bool visited[N][N];
queue<pair<pair<int,int>,int> > qb,q;
void flybee()
{
while(!qb.empty())
{
int t = qb.front().second,x = qb.front().first.first,y = qb.front().first.second;
qb.pop();
for(int i = -1;i <= 1;i++) for(int j = -1;j <= 1;j++)
{
if(i!=0 and j!=0) continue;
if(i==0 and j==0) continue;
int ai = x+i,aj = y+j;
if(ai<1 or ai>n or aj<1 or aj>n) continue;
if(c[ai][aj]=='D' or c[ai][aj]=='T') continue;
if(visited[ai][aj]) continue;
visited[ai][aj] = true;
bee[ai][aj] = t+1;
qb.push({{ai,aj},t+1});
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...