CSES Labryinth TLE?
Difference between en1 and en2, changed 23 character(s)
I have commented the code at places. I can't understand why the code gives TLE. 1 test case gives TLE.I have tried to optimise it as much as I could but still TLE. Help would be appreciated. I have used breadth first search to solve the problem.[The problem](https://cses.fi/problemset/task/1193/)↵

Also what would be worst case complexity?↵

<spoiler summary="Code">↵
#include <bits/stdc++.h>↵

using namespace std;↵

long long n,m;↵

string pr="";↵

char ch[1002][1002];↵

long long dx[4]={1,0,-1,0};↵
long long dy[4]={0,1,0,-1};↵

/*checks valididty of cell*/↵

bool is(long long x,long long y)↵
    //cout<<ch[x][y]<<" ";↵
    return (x>=0&&y>=0&&x<n&&y<m&&ch[x][y]!='#');↵

string l[4]={"D","R","U","L"};↵

struct vert↵
    long long a;↵
    long long b;↵
    string c;↵

int main()↵
    long long x,y,i,j,sti,stj,ndi,ndj;↵
    long long vis[n+1][m+1];↵
    queue<vert> q;↵
    /*The queue wil store the coordinate as well as string*/↵
       string s=q.front().c;↵
               /*pr is required string that we wnt to print*/↵
    return 0;↵



  Rev. Lang. By When Δ Comment
en2 English Forrest_Gump 2020-11-26 17:22:04 23 Tiny change: 'ives TLE. I have tri' -> 'ives TLE. 1 test case gives TLE.I have tri'
en1 English Forrest_Gump 2020-11-26 17:21:05 2133 Initial revision (published)