problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03014
u665038048
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
["from functools import reduce\nimport sys\nimport numpy as np\n\n\nmod = 10 ** 9 + 7\nbuffer = sys.stdin.buffer\nh, w = map(int, buffer.readline().split())\ns = np.frombuffer(buffer.read(h*(w+1)), dtype='B') == ord('.')\ns = s.reshape((h, w+1))[:, :-1]\nl = np.empty((h, w), dtype='i4')\nr = np.empty((h, w), dtype='i4'...
['Runtime Error', 'Runtime Error', 'Accepted']
['s907188880', 's936583898', 's729218816']
[49644.0, 47620.0, 110084.0]
[378.0, 378.0, 453.0]
[728, 734, 728]
p03014
u677267454
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
['import numpy as np\n\nh, w = map(int, input().split())\ngrid = [[False for j in range(w)] for i in range(h)]\n\nfor i in range(h):\n grid = []\n for i in range(h):\n grid.append(list(input()))\n grid = (np.array(grid) == ".") * 1 \n\ngrid = np.array(grid)\n\nL = np.zeros((h, w), dtype=int)\nR = np.ze...
['Runtime Error', 'Accepted']
['s704853809', 's137091957']
[82976.0, 266508.0]
[700.0, 867.0]
[989, 837]
p03014
u709304134
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
["H, W = list(map(int, input().split()))\nS = np.array([list(input().rstrip()) for _ in range(H)]) == '.'\nU = np.zeros((H, W), dtype=int)\nD = np.zeros((H, W), dtype=int)\nR = np.zeros((H, W), dtype=int)\nL = np.zeros((H, W), dtype=int)\nfor h in range(1, H):\n U[h] = (U[h - 1] + 1) * S[h - 1]\nfor h in reversed(ra...
['Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s282709931', 's339124584', 's439780864']
[3188.0, 173276.0, 219832.0]
[17.0, 2110.0, 861.0]
[536, 968, 559]
p03014
u747184036
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
["import sys\nsys.setrecursionlimit(10 ** 5)\n\n\ndef LI(): return [int(x) for x in sys.stdin.readline().split()]\n\n\ndef main():\n H, W = LI()\n S = [[1 for _ in range(W)] for _ in range(H)]\n for i in range(H):\n str = input()\n for j, s in enumerate(str):\n if s == '#':\n ...
['Wrong Answer', 'Accepted']
['s684221863', 's113927413']
[137852.0, 231240.0]
[2112.0, 1813.0]
[920, 688]
p03014
u784022244
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
['import numpy as np\nH, W=map(int, input().split())\nS=np.array([list(input()) for _ in range(H)])\nS=np.where(S==".",1,0 )\n\nleft=np.zeros((H, W))\nright=np.zeros((H, W))\ntop=np.zeros((H, W))\nbottom=np.zeros((H, W))\n\nfor i in range(W):\n if i==0:\n left[:,i]=S[:,i]\n right[:,-i-1]=S[:,-i-1]\n else:\n ...
['Runtime Error', 'Accepted']
['s270333725', 's426055915']
[254172.0, 250932.0]
[924.0, 1415.0]
[606, 801]
p03014
u830054172
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
['import numpy as np\nh, w = map(int, input().split())\narr = np.array([list(input()) for _ in range(h)]) == "."\nprint(arr)\nl = np.zeros((h, w), dtype=int)\nr = np.zeros((h, w), dtype=int)\nu = np.zeros((h, w), dtype=int)\nd = np.zeros((h, w), dtype=int)\n\nfor i in range(h):\n u[i] = (u[i - 1] + 1) * arr[i] \n ...
['Wrong Answer', 'Accepted']
['s098861958', 's629346869']
[219796.0, 219796.0]
[899.0, 882.0]
[537, 539]
p03014
u833543158
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
['import sys\nimport numpy as np\nH, W = map(int, input().split())\nS = [line.strip("\\n") for line in sys.stdin]\n\n\ntrailLeft = np.zeros((H, W), dtype=int)\ntrailRight = np.zeros((H, W), dtype=int)\ntrailUp = np.zeros((H, W), dtype=int)\ntrailDown = np.zeros((H, W), dtype=int)\n\nfor i in range(H): \n for j in r...
['Time Limit Exceeded', 'Wrong Answer', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Wrong Answer', 'Accepted']
['s083729359', 's135419571', 's623182209', 's786320134', 's934273729', 's295086736']
[139240.0, 226784.0, 225020.0, 169980.0, 200564.0, 266540.0]
[2109.0, 2118.0, 2118.0, 2111.0, 2115.0, 1204.0]
[1920, 1883, 2088, 1929, 1510, 1059]
p03014
u864013199
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
['import numpy as np\nH,W = map(int,input().split())\nS = [list(input()) for _ in range(H)]\nL = np.zeros((H,W))\nR = np.zeros((H,W))\nU = np.zeros((H,W))\nD = np.zeros((H,W))\nfor i in range(H):\n for j in range(W):\n if j == 0:\n if S[i][j] == "#":\n L[i,j] = -1\n contin...
['Wrong Answer', 'Accepted']
['s280230793', 's553814902']
[87676.0, 219812.0]
[2111.0, 859.0]
[1184, 688]
p03014
u888092736
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
['import numpy as np\nfrom numba import njit\n\n\n@njit("i2(i2, i2, i2[:,:])")\ndef solve(H, W, field):\n u = field.copy()\n d = field.copy()\n l = field.copy()\n r = field.copy()\n\n for i in range(1, H):\n u[i] = (u[i - 1] + 1) * u[i]\n d[-i - 1] = (d[-i] + 1) * d[-i - 1]\n\n for j in ...
['Time Limit Exceeded', 'Accepted']
['s556766804', 's480780778']
[169504.0, 79892.0]
[2210.0, 523.0]
[611, 463]
p03014
u888260709
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
["import re\n\nH, W = map(int, input().split())\nS_list = [list(input()) for _ in range(H)]\n\nl_count = [[i.span()[0] for i in re.finditer('#', s+'#')] for s in S_list]\n\nr_count = [[i.span()[0] for i in re.finditer('#', ''.join(s)+'#')] for s in list(zip(*S_list))]\n\nans = 0\n \nfor h in range(H):\n for w in ...
['Runtime Error', 'Accepted']
['s469726051', 's937203963']
[38644.0, 266540.0]
[121.0, 883.0]
[780, 701]
p03014
u888337853
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
['import math\nimport copy\nfrom copy import deepcopy\nimport sys\nimport fractions\nimport numpy as np\nfrom functools import reduce\n# import statistics\nimport heapq\nsys.setrecursionlimit(3000)\n\n# input = sys.stdin.readline\n\n\n# ===FUNCTION===\n\ndef getInputInt():\n inputNum = int(input())\n return input...
['Wrong Answer', 'Accepted']
['s632669086', 's403274939']
[50500.0, 228268.0]
[2111.0, 883.0]
[2111, 2680]
p03014
u899975427
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
["import sys\ninput = sys.stdin.readline\nh,w = map(int,input().split())\nl=['\nans = 1\n\ndef dfs(x,y,h,w):\n cnt = 1\n for i in range(1,w+2):\n if l[x+i][y] == '.':\n cnt += 1\n else:\n break\n for i in range(1,w+2):\n if l[x-i][y] == '.':\n cnt += 1\n else:\n break\n for i in rang...
['Wrong Answer', 'Time Limit Exceeded', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Runtime Error', 'Accepted']
['s002847993', 's039553973', 's049581621', 's148875491', 's161801898', 's488663067', 's609865831', 's613256492', 's614236037', 's624291009', 's986558268']
[9204.0, 421488.0, 9204.0, 9460.0, 421488.0, 421492.0, 80224.0, 442100.0, 442100.0, 420548.0, 219792.0]
[2104.0, 2132.0, 2104.0, 2104.0, 2132.0, 2131.0, 2109.0, 2131.0, 2131.0, 2130.0, 907.0]
[640, 908, 684, 602, 636, 785, 765, 840, 886, 831, 477]
p03014
u919017918
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
["\nH, W = [int(i) for i in input().split()]\n\nmymap = [] \nfor i in range(H):\n mymap.append(list(input()))\nLmap = list(list(-1 for a in range(W)) for b in range(H)) \nRmap = list(list(-1 for a in range(W)) for b in range(H)) (逆順)\nUmap = list(list(-1 for a in range(W)) for b in range(H)) \nDmap = list(list(-1 fo...
['Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Runtime Error', 'Accepted']
['s119800065', 's292048036', 's382184773', 's726827377', 's332223979']
[279028.0, 276340.0, 271400.0, 2940.0, 239184.0]
[2120.0, 2121.0, 2124.0, 17.0, 893.0]
[1415, 1606, 1353, 1306, 1338]
p03014
u921773161
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
["h, w = map(int, input().split())\ns = [[] for _ in range(h)]\nfor i in range(h):\n s[i] = list(input())\n\nhs = [[0]*w for _ in range(h)]\nws = [[0]*w for _ in range(h)]\n\nfor i in range(h):\n c = 0\n for j in range(w):\n if s[i][j] == '.':\n c += 1\n hs[i][j] = c\n else:...
['Wrong Answer', 'Accepted']
['s621577810', 's282295183']
[136680.0, 254744.0]
[2110.0, 1126.0]
[476, 927]
p03014
u944643608
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
["\nH, W = map(int, input().split())\ngrid = []\nfor i in range(H):\n tmp = input()\n grid.append(tmp)\n\n\nimport numpy as np\ngrid_int = np.zeros((H, W))\nfor i in range(H):\n count = 0\n for j in range(W):\n if grid[i][j] == '.':\n count += 1\n if j == W - 1:\n ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s200109071', 's441577825', 's560366936', 's723975749', 's763620825', 's795640149', 's700922516']
[61868.0, 7412.0, 61876.0, 17656.0, 191900.0, 47860.0, 191932.0]
[2162.0, 28.0, 944.0, 165.0, 742.0, 289.0, 793.0]
[1012, 1131, 1012, 1131, 972, 1168, 972]
p03014
u945181840
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
["import numpy as np\nimport sys\nbuf = sys.stdin.buffer\n\nH, W = map(int, buf.readline().split())\n#print(read[1].decode('utf-8'))\ngrid = np.zeros((H + 2, W + 2), dtype='int32')\n#grid[1:-1, 1:] = \\\ntemp = list(map(list, buf.read().decode('utf-8').split()))", "import numpy as np\nimport sys\nbuf = sys.stdin.buffer...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s285214553', 's622476330', 's543887555']
[51860.0, 129856.0, 126100.0]
[251.0, 839.0, 883.0]
[251, 467, 914]
p03014
u961816320
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
['from functools import reduce\nimport sys\nimport numpy as np\nMOD = 1000000007\n\nbuffer = sys.stdin.buffer\nH, W = list(map(int,buffer.readline().split()))\nS = np.frombuffer(buffer.read(H*(W+2)), dtype="B") == ord(".")\nS = S.reshape((H,W+2))[:,:-2]\nL = np.empty((H,W), dtype="i4")\nR = np.empty((H,W), dtype="i4")\...
['Runtime Error', 'Accepted']
['s205612373', 's573026037']
[20236.0, 110152.0]
[155.0, 453.0]
[721, 721]
p03014
u981931040
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
['import numpy as np\nH, W = map(int, input().split())\ns = [list(input()) for _ in range(H)]\ntable = np.zeros((H , W))\ndone = np.zeros((H , W))\nmax = 0\nprint(s[0][1])\n\nfor i in range(H):\n for j in range(W):\n if s[i][j] == "#":\n continue\n if done[i][j] == 1:\n continue\n...
['Runtime Error', 'Accepted']
['s242314079', 's078581750']
[110200.0, 219832.0]
[2111.0, 861.0]
[1000, 449]
p03014
u997641430
2,000
1,048,576
There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares. Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and...
["import numpy as np\nH,W=map(int,input().split())\nS=[list(input()) for h in range(H)]\nS=[[1 if s=='.' else 0 for s in S[h]] for h in range(H)]\nS=np.array(S)\nL=S.copy()\nR=S.copy()\nU=S.copy()\nD=S.copy()\nfor w in range(1,W):\n L[:,w]=(L[:,w-1]+1)*S[:,j]\n R[:,-(1+w)]=(R[:,-w]+1)*S[:,-(1+w)]\nfor h in range(...
['Runtime Error', 'Runtime Error', 'Accepted']
['s647025844', 's779381904', 's371845632']
[188624.0, 3064.0, 248740.0]
[801.0, 17.0, 1203.0]
[412, 3212, 417]
p03017
u017810624
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n,a,b,c,d=map(int,input().split());s=input();print('YNeos'[not'...'in s[b-2:d+1]or'##'in s[a:d]::2])", "n,a,b,c,d=map(int,input().split())\ns=input()\nf=0;F=0\nfor i in range(a,max(c,d)-1):\n if s[i]=='#' and s[i+1]=='#':f=1\nfor i in range(b-2,d-1):\n if s[i]=='.' and s[i+1]=='.' and s[i+2]=='.':F=1\nif F==0 and c...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s059018838', 's548828086', 's935569028', 's295326732']
[3572.0, 3572.0, 3064.0, 3572.0]
[19.0, 67.0, 17.0, 18.0]
[100, 234, 851, 106]
p03017
u023141436
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['7 1class Kenken():\n\tdef __init__(self,n,a,b,c,d,s):\n\t\tself.n = n\n\t\tself.a = a-1\n\t\tself.b = b-1\n\t\tself.c = c-1\n\t\tself.d = d-1\n\t\tself.s = s\n\t\tself.s = self.s[:a-1] + "A" + self.s[a:]\n\t\tself.s = self.s[:b-1] + "B" + self.s[b:]\n\n\tdef str_replace(self,i,k,S):\n\t\tif k == 1:\n\t\t\tself.s = se...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s056825287', 's695813228', 's720154065', 's228250951']
[2940.0, 2940.0, 135316.0, 3572.0]
[17.0, 17.0, 196.0, 19.0]
[2215, 2231, 2245, 206]
p03017
u037430802
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n,a,b,c,d = map(int, input().split())\n\u200b\ns = input()\n\u200b\n\u200b\n\nif c > d:\n \n if s[a:].count("##") == 0:\n if s[b-1:d+1].count("...") >= 1:\n print("Yes")\n else:\n print("No")\n else:\n print("No")\nelse:\n if s[a:].count("##") == 0:\n print("Yes")\n else:\n print("No")',...
['Runtime Error', 'Runtime Error', 'Accepted']
['s388335641', 's393050122', 's547978594']
[3192.0, 2940.0, 3572.0]
[18.0, 17.0, 18.0]
[507, 553, 257]
p03017
u039360403
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["N,A,B,C,D=map(int,input().split())\nS=input()\nif C<D and B<C:\n for i in range(A-1,D-2):\n if S[i]=='#' and S[i+1]=='#':\n print('No')\n exit()\n print('Yes')\n exit()\nelif C<D and B>C:\n for i in range(A-1,C-2):\n if S[i] == '#' and S[i + 1] == '#':\n prin...
['Runtime Error', 'Accepted']
['s254500146', 's095313024']
[3064.0, 3572.0]
[17.0, 61.0]
[739, 782]
p03017
u041783158
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["N, A, B, C, D = [int(i) - 1 for i in input().strip().split(' ')]\nN += 1\nS = [c for c in input().strip()]\n\n\ndef get(a, b):\n s = S[:]\n s[a] = 'A'\n s[b] = 'B'\n\n return s\n\n\ndef check(s, i, dest):\n while i < dest:\n i += 1\n if i <= dest and s[i] == '.':\n continue\n i += 1\n if i <= de...
['Wrong Answer', 'Accepted']
['s460409709', 's188069203']
[132244.0, 4924.0]
[2104.0, 55.0]
[1104, 643]
p03017
u047816928
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["N, A, B, C, D = [int(c) for c in input().split()]\nS = input() + '##'\n\nr = [[False]*(N+2) for _ in range(N+2)]\n\ndef move(x1, x2):\n if r[x1][x2]: return\n r[x1][x2] = True\n if S[x1]=='#' or S[x2]=='#' or x1==x2: return\n move(x1+1, x2)\n move(x1+2, x2)\n move(x1, x2+1)\n move(x1, x2+2)\n\nmo...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s040310091', 's515347282', 's907003875', 's663527233']
[2034868.0, 16588.0, 14204.0, 26204.0]
[2230.0, 2104.0, 2104.0, 269.0]
[365, 500, 523, 1228]
p03017
u054556734
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n,a,b,c,d = map(int,input().split())\ns = input()\n\nans = "No"\nif "##" in s[a-1:c] or "##" in s[b-1:d]: pass\nelse:\n \n l = list(s) ; l[d-1]="#" ; s2 = "".join(l)\n if "##" in s2[0:c]:\n \n if "..." in s[b:d-1]:\n s = s[0:b] + s[b:d].replace("...",".#.") + s[d:n]\n if s...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s710664677', 's778484782', 's889127279', 's615065149']
[5172.0, 5172.0, 5172.0, 3572.0]
[24.0, 24.0, 24.0, 18.0]
[579, 555, 575, 204]
p03017
u059436995
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['judge = True\nif "##" in s[a - 1:c] or "##" in s[b - 1:d]:\n judge = False\n\nif judge and c > d:\n if not "..." in s[b - 2:d + 1]:\n judge = False\n\nprint("Yes") if judge else print(\'No\') ', 'n, a, b, c, d = map(int, input().split())\ns = input()\n\njudge = True\nif "##" in s[a - 1:c] or "##" in s...
['Runtime Error', 'Accepted']
['s388542448', 's109593890']
[2940.0, 3572.0]
[17.0, 20.0]
[198, 253]
p03017
u063550903
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['N,A,B,C,D = map(int,input().split())\nS = input()\nsunuke = A\nhunuke = B\n\ndef syori1(sunuke,hunuke):\n while hunuke<D:\n if hunuke+1 == N:\n return "YES"\n if S[hunuke+1] == ".":\n hunuke += 2\n elif S[hunuke] == ".":\n hunuke += 1\n else:\n ...
['Wrong Answer', 'Accepted']
['s769630552', 's787539539']
[3572.0, 3572.0]
[69.0, 62.0]
[883, 1074]
p03017
u075595666
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n,a,b,c,d = map(int,input().split())\ns = input()\nS = s[:max(c,d)]\nprint(S)\nl = len(S)\nC = True\nD = False\nfor i in range(l-1):\n if i >= min(a,b) and S[i]=='#' and S[i+1]=='#':\n C = False\n break\n if c > d and d > i >= max(a,b)-1:\n if S[i-1]=='.' and S[i]=='.' and S[i+1]=='.':\n D = True\n ...
['Wrong Answer', 'Accepted']
['s817031831', 's095894292']
[4020.0, 3636.0]
[191.0, 184.0]
[423, 424]
p03017
u076306174
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['import sys\n\nn,a,b,c,d=map(int, input().split()) \ns=input()\n\nsl=list(s)\n\nsl[a-1]="A"\nsl[b-1]="B"\nsl[c-1]="a"\nsl[d-1]="b"\nprint(sl)\n\nif c>d:\n g_far=c\nelse:\n g_far=d\n\n\nfor i in range(a-1,g_far-2):\n if sl[i]=="#" and sl[i+1]=="#":\n #print("No")\n sys.exit()\n\n\n\nif c>d:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s012229217', 's692119896', 's411667265']
[7728.0, 7728.0, 4924.0]
[75.0, 155.0, 59.0]
[611, 609, 609]
p03017
u076512055
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["N, A, B, C, D = map(int, input().split())\nS = input()\n\nAtoC = True\nBtoD = True\nreplace = False\n\nfor n in list(range(A-1,C)):\n if S[n] =='#' and S[n+1] =='#':\n AtoC = False\n \nfor n in list(range(B-1,D)):\n if S[n] =='#' and S[n+1] == '#':\n BtoD = False\n \nfor n in list(ra...
['Runtime Error', 'Accepted']
['s973364573', 's443338661']
[11060.0, 11060.0]
[90.0, 77.0]
[607, 619]
p03017
u106311097
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["# -*- coding: utf-8 -*-\n# agc034/agc034_a\nimport sys\n\ns2nn = lambda s: [int(c) for c in s.split(' ')]\nss2nn = lambda ss: [int(s) for s in list(ss)]\nss2nnn = lambda ss: [s2nn(s) for s in list(ss)]\ni2s = lambda: sys.stdin.readline().rstrip()\ni2n = lambda: int(i2s())\ni2nn = lambda: s2nn(i2s())\nii2ss = lambda n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s372310711', 's707868398', 's834767085']
[3572.0, 3572.0, 3572.0]
[18.0, 19.0, 20.0]
[495, 699, 704]
p03017
u111365362
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n,A,B,C,D = map(int,input().split())\ns = input()[A-1:max(C,D)]\nflag = 1\na,b,c,d = 0,B-A,C-A,D-A\nif s[a]=='#' or s[b]=='#' or s[c]=='#' or s[d]=='#':\n flag = 0\nif bool('##' in s) == 1:\n flag = 0\nif c > d:\n scut = s[b-1:d+2]\n if bool('...' in scut) == 0:\n flag = 0\nif flag == 1:\n print('YES')\nelse:...
['Wrong Answer', 'Accepted']
['s958007024', 's641810086']
[3572.0, 3572.0]
[20.0, 20.0]
[318, 318]
p03017
u115110170
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['N,A,B,C,D = map(int,input().split())\nS = input()\nobs = [S[i] is "#" and S[i+1] is "#" for i in range(0,max(C,D)-1)]\nspace = [S[i] is "." and S[i+1] is "." and S[i+2] is "." for i in range(0,max(C,D)-2)]\nif C < D:\n if True in obs[B:D] or True in obs[A:C]:\n print("No")\n else:\n print("Yes")\nelse:\n if ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s695013458', 's790067732', 's793580416']
[11732.0, 11732.0, 3572.0]
[81.0, 83.0, 52.0]
[474, 470, 432]
p03017
u117651451
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["N,A,B,C,D = map(int,input().split())\nS = input()\nright = max(C,D)-1\nr = min(C,D)-1\n\nif '##' in S[A-1:C-1] or '##' in S[B-1:D-1]:\n print('No')\nelse:\n if C < D:\n \tprint('Yes')\n break\n else:\n if '...' in S[B-1:right]:\n print('Yes')\n break\n else:\n if len(S[A-1:right])<=6:\n ...
['Runtime Error', 'Accepted']
['s074067331', 's577057450']
[2940.0, 3572.0]
[17.0, 18.0]
[350, 397]
p03017
u118051692
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["import re\n\nn,a,b,c,d = input().split()\nli = input()\n\npat1 = '##'\npat2 = r'\\.\\.\\.'\n\nsm = int(c) if int(c) < int(d) else int(d)\nlg = int(c) if int(c) > int(d) else int(d)\n\nsh = li[:sm]\nsh = [int(b) - 1:]\nlo = li[:lg]\nret = ''\n\nif re.match(pat1, lo):\n ret = 'No'\nelse:\n if c > d:\n if r...
['Runtime Error', 'Accepted']
['s158003465', 's543823657']
[2940.0, 3764.0]
[17.0, 21.0]
[421, 381]
p03017
u119062066
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n,a,b,c,d = map(int,input().split())\ns = input()\nflag = 0\nbleh = 0\nfor i in range(a,d-1):\n if s[i:i+2]=="##":\n print("No")\n flag = 1\nif flag == 0:\n if c>d:\n for j in range(b,d):\n if s[j:j+3]=="...":\n bleh = 1\n else:\n print("Yes") ...
['Wrong Answer', 'Accepted']
['s931929167', 's696117451']
[3572.0, 3572.0]
[72.0, 87.0]
[399, 401]
p03017
u128646083
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n,a,b,c,d=map(int,input().split())\ns=str(input())\ns=s.replace('.','0')\ns=s.replace('#','1')\nx=0\ny=0\nf=0\ng=0\nfor i in range(c-a-2):\n x=int(s[i+a+1])\n y=int(s[i+a+2])\n if(x*y==1):\n f=-1\nfor j in range(d-b-2):\n x=int(s[j+b+1])\n y=int(s[j+b+2])\n if(x*y==1):\n g=-1\nif(d<c):...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s208509210', 's448713434', 's716690538', 's851863788']
[3064.0, 3064.0, 3060.0, 3636.0]
[17.0, 17.0, 17.0, 236.0]
[411, 498, 236, 405]
p03017
u131406102
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["s = input()\ns = s.split('BC')\ncount = [0]\ncount_all = 0\nIcount = 0\n\nfor i in range(0,len(s)-1):\n Icount = 0\n j = 1\n while(j<=len(s[i]) and s[i][-j]=='A'):\n Icount = Icount + 1\n j = j + 1\n \n if (s[i]=='' or s[i]=='A'*len(s[i])):\n Icount = Icount + count[-1]\n \n ...
['Wrong Answer', 'Accepted']
['s877883038', 's233211311']
[3064.0, 3572.0]
[18.0, 57.0]
[379, 614]
p03017
u133886644
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['import sys\nfrom collections import defaultdict\nsys.setrecursionlimit(200000)\ninput = sys.stdin.readline\n\nN, A, B, C, D, = map(int, input().split())\nL = list(input().strip())\n\nA -= 1\nB -= 1\nC -= 1\nD -= 1\n\nm = [0] * N\nm[A] = 1\n\nfor i in range(N):\n if m[i] > 0:\n if i + 1 < N and L[i + 1] == "...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s576011965', 's849117964', 's293874081']
[8052.0, 8052.0, 8052.0]
[198.0, 162.0, 169.0]
[827, 676, 830]
p03017
u143509139
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n, a, b, c, d = map(int, input().split())\ns = list(input())\nfor i in range(b, d - 1):\n if s[i] == '#' and s[i + 1] == '#':\n print('No')\n exit(0)\nfor i in range(a, c - 1):\n if s[i] == '#' and s[i + 1] == '#':\n print('No')\n exit(0)\nif c < d:\n exit(1)\nelse:\n l, r = a ...
['Runtime Error', 'Accepted']
['s585883837', 's470913616']
[4856.0, 3572.0]
[129.0, 21.0]
[669, 164]
p03017
u149752754
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["N,A,B,C,D = map(int,input().split())\nA -= 1\nB -= 1\nC -= 1\nD -= 1\nS = list(input())\nif (A < B < D < C):\n cnt = 0\n cntl = [0]\n for i in range(A+1,C):\n if (S[i] == '.') & (S[i+1] == '.'):\n cnt += 1\n if i == C-1:\n cntl.append(cnt)\n elif (S[i] == '....
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s120616018', 's153903655', 's894418170']
[6680.0, 6096.0, 5892.0]
[161.0, 171.0, 237.0]
[3300, 1881, 1647]
p03017
u160459241
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["li = list(input())\ncount = 0\n\ncounta = 0\ni = 0\nwhile(i<len(li)-1):\n if(li[i]=='A'):\n counta += 1\n if(li[i+1]=='B' and li[i+2]=='C'):\n count += counta\n li[i]='B'\n li[i+1]='C'\n li[i+2]='A'\n i = i+2\n else:\n counta = 0\n i = i+1\n\nprint(count)", "n, a, b, c, d = map(...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s564107182', 's585309751', 's626867085', 's179804311']
[3064.0, 4924.0, 4916.0, 4924.0]
[18.0, 67.0, 79.0, 93.0]
[276, 757, 643, 761]
p03017
u172386990
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["N, A, B, C, D = map(int, input().split())\n \nS = input()\n \nS = S + '###'\n \ndef continuous_rock_search(S):\n for i in range(len(S) - 1):\n if S[i] == '#' and S[i+1] == '#':\n return True\n return False\n \ndef validation_funuke_move(S, B, D):\n \n funuke_position = B\n while (B <...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s403811479', 's575081391', 's832335125', 's225682324']
[3516.0, 3512.0, 3064.0, 3512.0]
[35.0, 19.0, 17.0, 45.0]
[1102, 1130, 1179, 1177]
p03017
u173374079
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n, a, b, c ,d = map(int, input().split())\n\n\ndef main():\n if "##" in s[b:d-2]:\n return "No"\n if "##" in s[c:c-2]:\n return "No"\n\n if c < d:\n return "Yes"\n \n else:\n\n if "..." in s[b-2:d-1]:\n return "Yes"\n \n return "No"\n\nprint(...
['Runtime Error', 'Runtime Error', 'Accepted']
['s219644211', 's649774176', 's400370764']
[3064.0, 3064.0, 3572.0]
[17.0, 17.0, 19.0]
[330, 547, 328]
p03017
u181367828
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n,a,b,c,d = ( int(i) for i in input().split())\ns = input()\n\na_to_c = s[a-1:c-1]\nb_to_d = s[b-1:d-1]\nif (b-1)-2 < 0:\n b_to_d2 = s[b-1:d-1]\nelif:\n b_to_d2 = s[b-1-2:d-1]\n\npossibility = True\n\nif a_to_c.find("##")!=-1 or b_to_d.find("##")!=-1:\n possibility = False\nif c>d:\n if not(b_to_d2.find(\...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s232486284', 's253704819', 's766690940', 's834252514', 's725892032']
[2940.0, 2940.0, 3064.0, 2940.0, 3636.0]
[18.0, 17.0, 18.0, 17.0, 21.0]
[403, 404, 500, 398, 394]
p03017
u183256664
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['import re\n\ncount = 0\n\ndef count_inversion(sequence):\n return sum(sum(m>n for m in sequence[i+1:]) for i,n in enumerate(sequence))\n\ns = input()\ns = s.replace("BC", "D")\ns = re.split(r"[B-C]+", s)\n\nwhile "" in s:\n s.remove("")\nfor x in s:\n count += count_inversion(list(x))\n \nprint(count)...
['Wrong Answer', 'Accepted']
['s925982740', 's804780061']
[3188.0, 4788.0]
[19.0, 36.0]
[302, 355]
p03017
u183966781
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n,a,b,c,d = map(int,input().split(' '))\ns=input()\nans=1\n\nif c<d:\n m=d\nelse:\n m=c\n\nfor i in range(a, m-3):\n if s[i] == '#' and s[i+1] == '#':\n ans=0\n\nif c<d:\n if s[c-2] =='#' or s[c] == '#':\n ans=0\n\nflag=0\nif d<c:\n for i in range(b-2, d-2):\n if s[i] == '....
['Wrong Answer', 'Accepted']
['s664804305', 's520124120']
[3572.0, 3572.0]
[63.0, 59.0]
[448, 389]
p03017
u196697332
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["N, A, B, C, D = map(int, input().split())\nS = str(input())\n\nnew_D = [S_new[1: D], '#', S_new[D + 1: N]]\n_ = ''.join(new_D)\n\nimport re\nregex = r'##+'\nmatchobj = re.match(regex, _)\nregex_dot = r'..+'\nmatch_dot = re.match(regex_dot, _[D:])\nif matchobj is not None and match_dot is None:\n print('No')\nelse:...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s580685084', 's719441811', 's763493414', 's619710258']
[3572.0, 3572.0, 3060.0, 3572.0]
[17.0, 17.0, 17.0, 18.0]
[322, 322, 262, 335]
p03017
u204800924
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n, a, b, c, d = map(int, input().split())\ns = input()\n\nif "##" in s[a:c+1] or "##" in s[b:d+1] :\n print("No")\nelif c<d:\n print("Yes")\nelif "..." in s[b-2:d] :\n print("Yes")\n else:\n print("No")\n', 'n, a, b, c, d = map(int, input().split())\ns = input()\n\nif "##" in s[a-1:c] or "##" in s[b-1:d] :\n ...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s123467368', 's287761089', 's304681287', 's614559530', 's868290480', 's408427460']
[2940.0, 2940.0, 3636.0, 3636.0, 3636.0, 3572.0]
[17.0, 17.0, 18.0, 18.0, 18.0, 19.0]
[221, 223, 413, 446, 461, 220]
p03017
u212328220
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n, a, b, c, d = map(int, input().split())\ns = set(input())\n\nif '##' in s[a-1:d]:\n print('No')\n exit()\n\nif c < d:\n print('Yes')\n exit()\n\nif '...' in s[b-2:d+1]:\n print('Yes')\nelse:\n print('No')", "n, a, b, c, d = map(int, input().split())\ns = input()\n\nif '##' in s[a-1:d]:\n print(...
['Runtime Error', 'Accepted']
['s103137237', 's584999104']
[9460.0, 9340.0]
[26.0, 31.0]
[210, 205]
p03017
u217627525
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n,a,b,c,d=map(int,input().split())\ns=input()\nans="Yes"\nif c<b:\n for i in range(a-1,c-1):\n if s[i]=="#" and s[i+1]=="#":\n ans="No"\n break\n if ans=="Yes":\n for i in range(b-1,d-1):\n if s[i]=="#" and s[i+1]=="#":\n ans="No"\n br...
['Runtime Error', 'Accepted']
['s686858446', 's503967856']
[3064.0, 3572.0]
[17.0, 56.0]
[1580, 792]
p03017
u221345507
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["N, A, B, C, D = map(int,input().split())\nS = list(input())\n\nS_before_a = S.copy()\nS_before_a[B-1] ='#'\nA_list = S_before_a[A:C-1]\ncount = 0\nfor i in range (len(A_list)-1):\n if ''.join(A_list[i:i+2])=='##':\n count+=1\n\nS_after_a = S.copy()\nS_after_a[C-1]='#'\n\nB_list = S_after_a[B:D-1]\nfor i in ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s370554061', 's890572837', 's295385988']
[14276.0, 11324.0, 14400.0]
[260.0, 248.0, 282.0]
[795, 691, 1183]
p03017
u222643068
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["figure=input()\nmath=input()\nflg=False\n\nfigure=figure.split(' ')\nif math[3]>math[4]:\n flg=True\n \nfor i in range(len(math)-1):\n if math[i]=='#' and math[i+1]=='#':\n print('No')\n exit()\n \n if flg and i<figure[4] and math[i]=='.' and math[i]=='.' and math[i+2]=='.':\n flg=False\n\nif not flg:...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s090859303', 's099007113', 's249758327', 's860421225', 's919586804', 's621484596']
[3572.0, 3572.0, 3572.0, 3572.0, 3572.0, 3572.0]
[47.0, 131.0, 158.0, 48.0, 128.0, 148.0]
[316, 346, 370, 370, 359, 492]
p03017
u225388820
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n,a,b,c,d=map(int,input().split())\ns=input()\na-=1\nb-=1\nc-=1\nd-=1\nx=[]\ncnt=1\ny=s[0]\ng=[0,0,0,0]\nfor i in range(1,n):\n if s[i]==y:\n cnt+=1\n else:\n x.append([cnt,y])\n cnt=1\n y=s[i]\n if i==a:\n g[0]=len(x)\n if i==b:\n g[1]=len(x)\n if i==c:\n ...
['Runtime Error', 'Accepted']
['s058499689', 's455538670']
[3064.0, 3572.0]
[18.0, 69.0]
[600, 405]
p03017
u227082700
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n,a,b,c,d=map(int,input().split())\ns=input()\nif "##" in s[a-1:d] or "..." not in s[b-1:c+1]:print("No")\nelse:print("Yes")', 'n,a,b,c,d=map(int,input().split())\ns=input()\nif c<d:\n if "#" in s[a-1]+s[b-1]+s[c-1]+s[d-1]:print("No");exit()\n ans="Yes"\n for i in range(c-a):\n if s[a+i-1]==s[a+i]=="#":ans="No"...
['Wrong Answer', 'Accepted']
['s185335906', 's594661162']
[3572.0, 3572.0]
[18.0, 108.0]
[121, 482]
p03017
u228223940
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['import sys\nsys.setrecursionlimit(1000000)\n \nN,A,B,C,D = map(int,input().split())\nS = input()\n\n\nfor i in range(N-1):\n if S[i] == "#" and S[i+1] == "#":\n print("No")\n exit()\n\nif C < D:\n print("No")\n exit()\n\nif S[B-2] != "#" and S[B] == ".":\n print("Yes")\n exit()\n \nif ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s158294205', 's901476324', 's130818197']
[3572.0, 3572.0, 3572.0]
[76.0, 78.0, 61.0]
[620, 617, 595]
p03017
u228232845
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["import sys\n\n\ndef input(): return sys.stdin.readline().strip()\ndef I(): return int(input())\ndef LI(): return list(map(int, input().split()))\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef S(): return input()\ndef LS(): return...
['Wrong Answer', 'Accepted']
['s675147373', 's223367747']
[9520.0, 9532.0]
[154.0, 70.0]
[987, 885]
p03017
u231685196
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n,a,b,c,d = map(int,input().split())\ns = input()\na-=1\nb-=1\nd-=1\n\ncan_reach = True\nbef = False\nfor i in range(a,c):\n if s[i] == "#":\n if bef:\n can_reach = False\n else:\n bef = True\n else:\n bef = False\n\nbef = False\nfor i in range(b,d):\n if s[i] == "#...
['Wrong Answer', 'Accepted']
['s363320518', 's872942731']
[3572.0, 4084.0]
[66.0, 93.0]
[996, 357]
p03017
u231905444
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n,a,b,c,d=map(int,input().split())\ns=str(input())\narr=[]\nfor i in range(len(s)):\n\tif(s[i]==\'#\'):\n\t\tarr.append(-1)\n\telif(s[i]==\'.\'):\n\t\tarr.append(0)\n\na-=1\nb-=1\nc-=1\nd-=1\nflag=0\narr[a]=1\narr[b]=2\narr[c]=3\narr[d]=4\n\nif(c<d):\n\twhile(pos2<d):\n\t\tif(pos2+1<n and arr[pos2+1]==0):\n\t\t\tpos2...
['Runtime Error', 'Accepted']
['s676714991', 's267741369']
[5112.0, 5024.0]
[142.0, 164.0]
[1720, 1707]
p03017
u237044327
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["from collections import deque\n\nN, A, B, C, D = map(int, input().split(' '))\nS = input()\nblocks = [i+1 for i, s in enumerate([s for s in S]) if s == '#']\nflag = False\ncheck_set = set()\n\nque = deque([(A, B)])\nwhile que:\n A, B = que.pop()\n check_list.add((A, B))\n if A == C and B == D:\n flag ...
['Runtime Error', 'Accepted']
['s351507762', 's593687671']
[8336.0, 7952.0]
[44.0, 41.0]
[669, 377]
p03017
u248670337
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n,a,b,c,d=map(int,input().split())\nprint('YNeos'[('...' in input() or c<d)::2])", "n,a,b,c,d=map(int,input().split())\ns=input()\nprint('YNeos'['##' in s[a-1:max(c,d)] or not(c<d or '...' in s[b-2:d+1])::2])"]
['Wrong Answer', 'Accepted']
['s264782477', 's877055517']
[3572.0, 3572.0]
[19.0, 18.0]
[79, 122]
p03017
u254871849
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["# 2019-11-22 19:46:21(JST)\nimport sys\n\n\ndef main():\n n, a, b, c, d = [int(x) for x in sys.stdin.readline().split()]\n s = '#' + sys.stdin.readline().rstrip()\n\n if '##' in s[a+1:c-1] or '##' in s[b+1:d-1]:\n ans = 'No'\n else:\n if c < d:\n ans = 'No'\n else:\n ...
['Wrong Answer', 'Accepted']
['s804950648', 's895402584']
[3572.0, 3572.0]
[19.0, 18.0]
[467, 624]
p03017
u265506056
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['N,A,B,C,D=map(int,input().split())\nS=list(input())\na=0\nE=N-D\nif C>D:\n for i in range(N-3):\n if S[i]=="#":\n for j in range(1,4):\n if S[i]==S[i+j]:\n a=1\n if E==0:\n for i in range(B-1,D-1):\n if S[i]==".":\n if S[i]==S[i+1] and...
['Runtime Error', 'Accepted']
['s253205616', 's323084072']
[2940.0, 4864.0]
[17.0, 141.0]
[649, 683]
p03017
u267759008
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["def main():\n\tn,a,b,c,d = map(int,input().split())\n\ta-=1\n\tb-=1\n\tc-=1\n\td-=1\n\ts = input()\n\tfor i in range(b,max(c,d)):\n\t\tif s[i]==s[i+1]=='#':\n\t\t\tprint('NO')\n\t\t\treturn\n\tif c<d:\n\t\tprint('YES')\n\t\treturn\n\telse:\n\t\tif d!=0 and d!=n-1 and s[d-1] == s[d+1] == '.':\n\t\t\tprint('YES')\n\t\t...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s237739088', 's327598414', 's586568518']
[3516.0, 3572.0, 3572.0]
[34.0, 41.0, 20.0]
[311, 311, 265]
p03017
u268181283
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['import re\n\nS = input()\nS =re.sub("BC","D",S)\n\ncnt = 0\n\nif S.count("AD")==0:\n print(cnt)\nelse:\n while True:\n fd = S.count("AD")\n if fd == 0:\n break\n cnt += fd\n S = re.sub("AD", "DA", S)\n print(cnt)', 'N, A, B, C, D = [int(i) for i in input().split()]\nroad = [i for i in list(input()...
['Wrong Answer', 'Accepted']
['s133907790', 's187428096']
[3188.0, 6260.0]
[19.0, 101.0]
[216, 463]
p03017
u276204978
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["N, A, B, C, D = map(int, input().split())\nS = input()\nS += '#'\n\na = np.zeros(N+1)\nb = np.zeros(N+1)\na[A-1] = 1\nb[B-1] = 1\n\nfor i in range(N-1):\n if a[i] == 1:\n if S[i+1] == '.':\n a[i+1] = 1\n if S[i+2] == '.':\n a[i+2] = 1\n if b[i] == 1:\n if S[i+1] == '.'...
['Runtime Error', 'Accepted']
['s692194512', 's927545143']
[3572.0, 3572.0]
[18.0, 18.0]
[510, 184]
p03017
u281733053
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['\nn,a,b,c,d = map(int,input().split())\ns = input()\ns = s + "."\ncant = 0\nsanrenzoku = 0\nfor i in range(a-1,max(c-1,d-1)):\n if s[i] == "#":\n if s[i+1] == "#":\n cant = 1\n\nif c > d:\n for i in range(b-2,d-1)\n if s[i] == ".":\n if s[i+1] == ".":\n if s[i+2] == ".":\n...
['Runtime Error', 'Accepted']
['s349838090', 's055323100']
[2940.0, 3572.0]
[18.0, 62.0]
[539, 489]
p03017
u282707041
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['a', 'import re \nimport copy \n\nn,a,b,c,d=map(int,input().split()) ...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s070838202', 's379867531', 's578376628', 's855543611']
[2940.0, 4404.0, 4212.0, 4212.0]
[17.0, 25.0, 25.0, 25.0]
[1, 2178, 2065, 2073]
p03017
u296150111
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n,a,b,c,d=map(int,input().split())\ns=input()\nfor i in range(n-1):\n\tif s[i]==s[i+1]=="#":\n\t\tprint("No")\n\t\texit()\nthree=0\ns="#"+s\nfor i in range(b,d+1):\n\tif s[i]==s[i+1]==s[i-1]==".":\n\t\tthree=True\nif c<d:\n\tprint("Yes")\nelif three==True:\n\tprint("Yes")\nelse:\n\tprint("No")', 'n,a,b,c,d=map(int,in...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s134577726', 's493056109', 's738239921', 's270522614']
[3572.0, 2940.0, 2940.0, 3572.0]
[81.0, 17.0, 17.0, 85.0]
[267, 266, 11, 273]
p03017
u300579805
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n,a,b,c,d = map(int, input().split())\ns = str(input())\n\na,b,c,d = a-1,b-1,c-1,d-1\n\ncnt = 0\nfor i in range(a,max(c,d)+1):\n if s[i] == '#':\n cnt += 1\n if cnt >= 2:\n print('No')\n exit()\n else:\n cnt = 0\n\ncnt = 0\nif c > d:\n for i in range(b,d+1):\n ...
['Runtime Error', 'Accepted']
['s320309650', 's454330670']
[3064.0, 3572.0]
[17.0, 63.0]
[564, 712]
p03017
u310233294
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["N, A, B, C, D = map(int, input().split())\ns = input()\na, b, c, d = A - 1, B - 1, C - 1, D - 1\nif c < d:\n pattern = 1\n ans = 'No'\nelif c > d:\n pattern = 2\n ans = 'Yes'\nprint(ans)", "def b():\n import re\n s = input()\n s = re.sub(r'BC', 'D', s)\n ls = range(len(s))\n ac, c = 0, 0\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s531676388', 's747712833', 's749868357']
[3572.0, 3188.0, 3572.0]
[18.0, 19.0, 97.0]
[189, 285, 644]
p03017
u311636831
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['print("No")', "def solve(a, b, c, d, s):\n a -= 1\n b -= 1\n c -= 1\n d -= 1\n ss = s[a:c + 1]\n fs = s[b:d + 1]\n if '##' in ss:\n return False\n if '##' in fs:\n return False\n if c < d:\n return True\n fs2 = s[b - 1:d + 2]\n if '...' in ss and '...' in fs2:\n ...
['Wrong Answer', 'Accepted']
['s794897054', 's392065294']
[2940.0, 3572.0]
[17.0, 20.0]
[11, 433]
p03017
u314089899
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['##agc034_a\nN,A,B,C,D = map(int, input().split()) \nS = [0] + list(input())\n\n\n\n\n\n\n\n\n\n#A<B\n#A<C\n#B<D\n\nif A < B < D < C:\n need_passing = True\nelif (A < B < C < D) or (A < C < B < D):\n need_passing = False\n\n\n\n #Yes\n \n \n \n #No\n \n\npassing_point_set = ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s652421577', 's875874221', 's495513710']
[3064.0, 3064.0, 12192.0]
[18.0, 17.0, 106.0]
[2572, 2560, 2954]
p03017
u316322317
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n,a,b,c,d=map(int,input().split())\ns=input()\nsb=s[b-1:d]\nnb=len(sb)\nfor i in range(nb-1):\n if sb[i:i+2]=='##':\n print('No')\n exit()\n else:\n s[d-1]='#'\n \nsa=s[a-1:c]\nna=len(sa)\nfor i in range(na-1):\n if sa[i:i+2]=='##':\n print('No')\n exit()\n else:\n print('Yes')", "n,a,b,c,d=m...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s125692405', 's586534431', 's791862680', 's473831868']
[3572.0, 2940.0, 4528.0, 3572.0]
[18.0, 17.0, 181.0, 86.0]
[285, 317, 283, 317]
p03017
u321035578
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["def main():\n n, a, b, c, d = map(int,input().split())\n s = list(input())\n if c<d:\n for i in range(a-1,c-2):\n if s[i] == s[i+1] and s[i] == '#':\n print('No')\n return\n for i in range(b-1,d-2):\n if s[i] == s[i+1] and s[i] == '#':\n ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s264550762', 's472820488', 's769802008']
[4924.0, 3064.0, 4868.0]
[51.0, 17.0, 54.0]
[1051, 867, 850]
p03017
u325956328
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['N, A, B, C, D = map(int, input().split())\nS = ["#"] + list(input()) + ["#"]\n\nlocB = ["#"] * (N + 2)\np = B\nlocB[B] = "."\nfinalB = B\nwhile p < N:\n if locB[p] == "." and S[p + 1] == ".":\n locB[p + 1] = "."\n if locB[p] == "." and S[p + 2] == ".":\n locB[p + 2] = "."\n finalB = p\n p +=...
['Wrong Answer', 'Accepted']
['s783615297', 's839831524']
[13456.0, 9364.0]
[146.0, 31.0]
[649, 361]
p03017
u327162583
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['N,A,B,C,D = (int(i) for i in input().split())\nS = input()\nS = list(S)\n\nresult = "Yes"\nonon = True\n\nif C < D:\n for i in range(A-1,D:\n if S[i] == "#" and S[i + 1] == "#":\n result = "No"\nelse:\n result = "No"\n for i in range(A-1,C):\n if S[i] == "#" and S[i + 1] == "#":\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s587696326', 's843991621', 's981493547']
[3064.0, 3064.0, 4916.0]
[17.0, 17.0, 57.0]
[491, 614, 487]
p03017
u343128979
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["import math\nimport numpy as np\n\n\ndef inputs(): return list(map(int, input().split()))\n\n\ndef main():\n _, A, B, C, D = inputs()\n S = input()\n ans = []\n if '##' in S[A:C]:\n ans.append(True)\n else:\n ans.append(False)\n if '##' in S[B:D]:\n ans.append(True)\n else:\n...
['Wrong Answer', 'Accepted']
['s815751879', 's804447624']
[20508.0, 21500.0]
[303.0, 340.0]
[568, 902]
p03017
u346851130
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\ndef main():\n _, s_s, f_s, s_e, f_e = map(int, input().split())\n n = input().strip()\n\n if s_e == f_e:\n print('NO')\n elif '##' in n[s_s:max(s_e, f_e)]:\n print('NO')\n elif s_e < f_e:\n print('YES')\n elif '...' in n[f_s - 1:f_e + 2]:\n print('...
['Wrong Answer', 'Accepted']
['s643230826', 's741361641']
[3572.0, 3572.0]
[21.0, 18.0]
[372, 422]
p03017
u375616706
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['# python template for atcoder1\nimport sys\n\nN, A, B, C, D = map(int, input().split())\nL = list([v for v in input()])\n\nHOP = [1, 2]\ndp_d = [0]*N\ndp_d[B-1] = 1\nfor i in range(N):\n if L[i] == "#":\n continue\n for h in HOP:\n dst = i+h\n if dst < N and L[dst] == ".":\n dp_d...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s572424815', 's894517466', 's872556289']
[3064.0, 3572.0, 3572.0]
[17.0, 19.0, 19.0]
[775, 226, 233]
p03017
u392319141
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n , a0 , b0 , c0 , d0 = map(int,input().split())\ns = input()\n\n\nif a0 > b0 : \n a = b0\n b = a0\n c = d0\n d = c0\nelse : \n a = a0\n b = b0\n c = c0\n d = d0\n\nright = max(c,d)\n\nfor i in range(n-1) :\n if s[i] == '\n if i <= right :\n print('No')\n break\...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s092649790', 's172144472', 's292137626', 's422376834', 's438732095', 's538842563', 's545587708', 's566115085', 's214942340']
[3572.0, 3572.0, 3572.0, 3572.0, 3572.0, 3572.0, 3572.0, 3572.0, 3636.0]
[77.0, 94.0, 89.0, 77.0, 82.0, 74.0, 76.0, 85.0, 18.0]
[709, 712, 768, 879, 788, 708, 717, 716, 445]
p03017
u394244719
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['import sys\n\n\ninint = lambda: int(sys.stdin.readline())\ninintm = lambda: map(int, sys.stdin.readline().split())\ninintl = lambda: list(inintm())\ninstrm = lambda: map(str, sys.stdin.readline().split())\ninstrl = lambda: list(instrm())\n\nn, a, b, c, d = inintm()\ns = input()\n\ncnt = 0\n\nfor i in range(n):\n i...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s151384866', 's295024425', 's341522582']
[9664.0, 9472.0, 9376.0]
[30.0, 32.0, 30.0]
[717, 708, 478]
p03017
u427344224
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['N, A, B, C, D = map(int, input().split())\nS = list(input())\n\n\nwhite = []\nfor i in range(N - 2):\n if S[i] == "." == S[i + 1] == S[i + 2]:\n white.append(i + 1)\n\nif C > D:\n \n i = A - 1\n T = S.copy()\n T[B - 1] = "#"\n while C - 1 != i:\n if T[i + 1] == ".":\n i += 1...
['Wrong Answer', 'Accepted']
['s756467242', 's080153833']
[7796.0, 7796.0]
[115.0, 117.0]
[1251, 1292]
p03017
u442877951
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['N,A,B,C,D = map(int,input().split())\nS = str(input())\nE = max(C,D)\nAE = S[A:E+1]\nBD = S[B-2:D+1]\ncheck = 0\nif "##" in AE:\n check = 1\nelse:\n check = 0\nif check == 0 and C > D:\n if "..." in BD:\n check = 0\n else:\n check = 1\nif check == 0:\n print("OK")\nelse:\n print("MISS")', 'N,A,B,C,D = map...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s028097177', 's480917868', 's822844423', 's927110201', 's248527181']
[3636.0, 3572.0, 3572.0, 3060.0, 3572.0]
[18.0, 18.0, 18.0, 17.0, 18.0]
[281, 190, 251, 299, 190]
p03017
u454524105
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n, a, b, c, d = map(int, input().split())\ns = [0 if i == "\ncnt = 0\nfor si in range(a, max(c, d)):\n if si != 0:\n cnt = 0\n else:\n cnt += 1\n if cnt == 2:\n print("No")\n exit()\nif c < d:\n print("Yes")\n exit()\nidx = b - 1\ncnt = 0\nwhile idx < d:\n if ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s146541962', 's154780006', 's201413976', 's411514235', 's414496152', 's741288765', 's891239075', 's909778161']
[5044.0, 4916.0, 4924.0, 4916.0, 4916.0, 4916.0, 4924.0, 3572.0]
[66.0, 48.0, 64.0, 47.0, 45.0, 47.0, 64.0, 81.0]
[439, 277, 431, 316, 311, 312, 439, 283]
p03017
u456896733
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["import sys\nINPUT = sys.stdin.readline\n \ndef SINGLE_INT(): \n return int(INPUT())\ndef MULTIPLE_INT_LIST(): \n return list(map(int, INPUT().split()))\ndef MULTIPLE_INT_MAP(): \n return map(int, INPUT().split())\ndef SINGLE_STRING(): \n return INPUT()\ndef MULTIPLE_STRING(): \n return INPUT().split()\...
['Runtime Error', 'Accepted']
['s862558378', 's981636874']
[3060.0, 3444.0]
[17.0, 19.0]
[633, 609]
p03017
u465699806
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['\n#include<string>\n#include<list>\n#include<map>\n\n#include<cmath>\n\nusing namespace std;\n\nusing lli = long long int;\n\n\nint main(void){\n\tlli N,A,B,C,D;\n\tcin >> N >> A >> B >> C >> D;\n\t--A,--B,--C,--D;\n\tstring S;\n\tcin >> S;\n\tfor (int i = A; i < max(C,D); ++i) {\n\t\tif (S.substr(i, 2) == "##") {\n\...
['Runtime Error', 'Accepted']
['s337459593', 's878360596']
[2940.0, 6456.0]
[17.0, 82.0]
[706, 592]
p03017
u466143662
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n,a,b,c,d=map(int,input().split())\na-=1\nb-=1\nc-=1\nd-=1\n\ntemp=str(input())\nmaxim=max(a,b)\nif temp[maxim:].count("...")!=0 or temp[maxim+1]==temp[maxim+2]=="." or temp[maxim+1]==temp[maxim-1]==".":\n flag=1\nelse:\n flag=0\n \ns=list(temp)\ns[a]="A"\ns[b]="B"\ns[c]="C"\ns[d]="D"\n\nans=1\n\nfor i in ra...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s148330972', 's454296913', 's872016597', 's362683277']
[3064.0, 3064.0, 3064.0, 5044.0]
[17.0, 18.0, 17.0, 63.0]
[576, 642, 642, 606]
p03017
u466519409
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['N,A,B,C,D=map(int,input().split())\nS=input()\nif "##" in:\n print("No")\nelif (S[C-2])=="#" and C>D:\n print("No")\nelif (S[C])=="#" and C>D:\n print("No")\nelse:\n print("Yes")\n', 'N,A,B,C,D=map(int,input().split())\nS=input()\n\nif C<D:\n if "##" not in S[A:C-1] or "##" not in S[B:D-1]:\n pr...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s028716339', 's066056480', 's525237626', 's533002898', 's752429029', 's774289018']
[2940.0, 2940.0, 2940.0, 3572.0, 2940.0, 3572.0]
[17.0, 17.0, 18.0, 18.0, 17.0, 19.0]
[182, 291, 126, 216, 331, 190]
p03017
u474423089
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["def main():\n n,a,b,c,d=map(int,input().split(' '))\n s=input()\n result = 'Yes'\n if a<b<d<c:\n tmp =0\n cnt=0\n for i in range(b-2,d+1):\n if s[i]=='#'and s[i+1]=='#':\n result='No'\n break\n if s[i]=='.':\n tmp +=1\...
['Runtime Error', 'Accepted']
['s848911026', 's793625847']
[3064.0, 3636.0]
[18.0, 45.0]
[922, 661]
p03017
u489762173
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["N, A, B, C, D = list(map(int,input().split()))\nS = input()\n\nfor i in range(N-1):\n if S[i] == '#' and S[i+1] == '#':\n print('No')\n exit()\n\n if C > D:\n for i in range(N-2):\n if S[i] == '.' and S[i+1] == '.' and S[i+2] == '.':\n print('Yes')\n ...
['Wrong Answer', 'Accepted']
['s445430203', 's056140855']
[4404.0, 3572.0]
[165.0, 67.0]
[381, 460]
p03017
u490045217
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['N, A, B, C, D = map(int,input().split())\nS = input()\nslist = list(S)\nbuf = "".join(slist[A:max(C,D)-1])\n#print(N, A, B, C, D)\n#print(S)\n\njudge = buf.find("##")\n#print(judge)\n\n#print(slist[A::])\n#print(judge)\nif judge != -1:\n print("No")\nelse:\n if C < D:\n print("No")\n else:\n s_change= "".joi...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s430312091', 's783295000', 's880771881', 's315082425']
[6732.0, 2940.0, 2940.0, 6580.0]
[28.0, 17.0, 17.0, 26.0]
[452, 11, 12, 340]
p03017
u492026192
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n,a,b,c,d=map(int,input().split())\ns=input()\nflag=0\nspan=0\nbuf=-5\nif(c<d):\n for i in range(a-1,d):\n if(s[i]=='#' and s[i+1]=='#'):\n flag=1\n break\nelse:\n for i in range(a-1,c):\n if(s[i]=='#' and s[i+1]=='#'):\n flag=1\n break\n elif s[i...
['Wrong Answer', 'Accepted']
['s688777059', 's305639815']
[3572.0, 3572.0]
[92.0, 49.0]
[479, 376]
p03017
u495903598
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['#!/usr/bin/env python\n# coding: utf-8\n\n# In[2]:\n\n\nN, A, B, C, D = map(int, input().split())\nS = input()\n"""\n7 1 3 7 6\n.#..#..\n"""\n\n\n# In[25]:\n\n\nS = input()\n\n\n# In[26]:\n\n\n#print(A, B, C, D)\n\n\n# In[37]:\n\n\nk = []\ntry:\n st = S.index(".")+1\nexcept:\n print("No")\nfor i in range(N):\n ...
['Runtime Error', 'Accepted']
['s012830486', 's855038428']
[3700.0, 3572.0]
[20.0, 19.0]
[1749, 2602]
p03017
u500297289
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['N, A, B, C, D = map(int, input().split())\nS = list(input())\n\nA -= 1\nB -= 1\nC -= 1\nD -= 1\n\nif S[A:C] in \'##\' or S[B:D] in \'##\':\n print("No")\n exit()\nif C > D:\n if S[B:D] in \'...\':\n print("Yes")\n exit()\n else:\n print("No")\n exit()\nprint("Yes")\n', 'N, A, B...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s375969004', 's418871841', 's427146224', 's895832685']
[6260.0, 4996.0, 9320.0, 3572.0]
[23.0, 53.0, 158.0, 18.0]
[282, 1029, 2647, 241]
p03017
u501451051
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["n,a,b,c,d = map(int, input().split())\ns = input()\n\nif '##' in s:\n print('No')\n exit()\nelse:\n if c<d:\n print('Yes')\n else:\n if '...' in s[b-2:d+1]:\n print('Yes')\n else:\n print('No')\n\nprint(s[b-1:d])", "n,a,b,c,d = map(int, input().split())\ns = inpu...
['Wrong Answer', 'Accepted']
['s927118105', 's065435094']
[9296.0, 9260.0]
[29.0, 29.0]
[252, 251]
p03017
u502731482
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n, a, b, c, d = map(int, input().split())\ns = input()\nflag1, flag2 = False, False\nif d > c:\n print("OK1")\n flag = "##" not in s[b: d - 1] and "##" not in s[a: c - 1]\nelse:\n print("OK2")\n flag = "..." in s[b: d - 1]\n\nprint("Yes" if flag else "No")', 'n, a, b, c, d = map(int, input().split())\ns =...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s163656371', 's327899274', 's595750807', 's058174159']
[3572.0, 3572.0, 2940.0, 3572.0]
[18.0, 18.0, 17.0, 18.0]
[258, 254, 211, 220]
p03017
u505420467
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
['n, a, b, c, d = map(int, input().split())\ns = list(input())\n\nfor i in range(n-1):\n if s[i] == "#" and s[i+1] == "#":\n print("No")\n exit()\nif d < c:\n for i in range(n-2):\n\n if s[i] == "." and s[i+1] == "." and s[i+2] == ".":\n print("Yes")\n exit()\n\n prin...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s170437786', 's382882414', 's769172276']
[4916.0, 4916.0, 3572.0]
[76.0, 76.0, 18.0]
[345, 346, 212]
p03017
u507027929
2,000
1,048,576
There are N squares arranged in a row, numbered 1, 2, ..., N from left to right. You are given a string S of length N consisting of `.` and `#`. If the i-th character of S is `#`, Square i contains a rock; if the i-th character of S is `.`, Square i is empty. In the beginning, Snuke stands on Square A, and Fnuke stand...
["S = input()\nS = S.replace('BC', 'X')\n\nans = 0\nacc_A = 0\nfor s in S:\n if s=='A':\n acc_A += 1\n elif s=='X':\n ans += acc_A\n else:\n acc_A = 0\n\nprint(ans)", "n, a, b, c, d = map(int, input().split())\n\nS = input()\nx = [0]\n\nfor s in S:\n if s == '#':\n x.append(1)\n ...
['Wrong Answer', 'Accepted']
['s758675467', 's220338458']
[3060.0, 4916.0]
[17.0, 111.0]
[179, 479]