hiho week 272 register

Ended

Participants:79

Verdict:Accepted
Score:100 / 100
Submitted:2019-09-21 16:28:53

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <assert.h>
#include <queue>
#include <time.h>
using namespace std;
const int inf=0x3f3f3f3f;
const int N=500+9;
#define ll unsigned long long
bool tu[N][N];
char s[N][N];
int x,y ,n,m;
queue<pair<int,int> > q;
int v[N][N];
int mx[4]={0,1,0,-1};
int my[4]={1,0,-1,0};
pair<int,int> get_next(int x,int y,int i,bool &ok)
{
    while(1)
    {
        if(s[x][y]=='T') ok=1;
        int nx=x+mx[i];
        int ny=y+my[i];
        if(tu[nx][ny]==0) break;
        x=nx;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX