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
p03017
u507613674
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\nstdin = sys.stdin\nread_int = lambda : list(map(int,stdin.readline().split()))\nread_str = lambda : stdin.readline().rstrip()\n\nN, A, B, C, D = read_int()\nS = read_str()\n\n\n\ndef solve():\n until = max(C,D)\n is_comma_suc3 = \'...\' in S[B - 1 : until]\n is_hash_suc3 = \'\n if C < D:\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s365198269', 's406906402', 's675439791', 's605439467']
[3572.0, 3572.0, 3572.0, 3636.0]
[19.0, 20.0, 18.0, 19.0]
[640, 641, 637, 470]
p03017
u509368316
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=input()\ns=[0]*N\nstop=[0]*N\nspace=[0]*N\nfor i in range(N):\n if S[i]=='#':\n s[i]=1\n if i>0 and s[i-1]==1:\n stop[i]=1\n elif i>1 and s[i-1]==0 and s[i-2]==0:\n space[i]=1\n if i>0:\n stop[i]+=stop[i-1]\...
['Wrong Answer', 'Accepted']
['s006755760', 's808266916']
[11348.0, 7928.0]
[209.0, 167.0]
[501, 481]
p03017
u510097799
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()\nres = "YES"\ne = max(c,d)\nif "##" in s[a-1:e-1]:\n\tres = "NO"\nelif c > d:\n\tif "..." not in s[b-2:d+1]:\n\t\tres = "NO"\nprint(res)\n', 'n, a, b, c, d = [int(i) for i in input().split()]\ns = input()\nres = "YES"\ne = max(c,d)\nif "##" in s[a-1:e-1]:...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s408546000', 's935066832', 's148104291']
[3572.0, 3636.0, 3572.0]
[20.0, 19.0, 18.0]
[187, 205, 186]
p03017
u517142514
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()\n\nflag = 0\nans = 0\ni = 0\nS= list(S)\n\n\nwhile flag == 0:\n if len(S) < 3+i:\n flag = 1\n elif S[i]=="A" and S[i+1]=="B" and S[i+2]=="C":\n S[i] = \'B\'\n S[i+1] = \'C\'\n S[i+2] = \'A\'\n i=0\n ans+=1\n elif S[i]=="A":\n i+=1\n else:\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s062459190', 's091849485', 's271933718', 's300800447']
[3064.0, 3572.0, 3064.0, 3572.0]
[17.0, 62.0, 17.0, 108.0]
[317, 799, 317, 970]
p03017
u518064858
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 s[a-1:max(c,d)].count("##")>0:\n print("No")\nelif c<d:\n print("No")\n', 'n,a,b,c,d=map(int,input().split())\ns=input()\nif s[:max(c,d)].count("##")>0:\n print("No")\nelif c<d:\n print("Yes")\nelse:\n if s[b-1:d+1].count("...")=0:\n print("No")\...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s296425967', 's375415396', 's353139035']
[3572.0, 2940.0, 3572.0]
[18.0, 18.0, 19.0]
[121, 210, 214]
p03017
u520276780
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 = input()\nif "##" in s[a:c+1] or "##" in s[b:d+1]:\n print("No")\n exit()\nif c > d:\n if "##" in s[a:c+1] :\n print("No")\n exit()\n print("Yes" if "..." in s[b-1:d+2] else "No")\n', 'n, a, b, c, d = map(int, inpu...
['Wrong Answer', 'Accepted']
['s086992972', 's044321128']
[9364.0, 9488.0]
[30.0, 30.0]
[271, 314]
p03017
u521973174
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...
["x = input().split()\ns = input()\nn = int(x[0])\na = int(x[1])\nb = int(x[2])\nc = int(x[3])\nd = int(x[4])\n \n \nkome_flag = False \nsanten_flag = False \n \na_s = s[a:c]\nb_s = s[b:d]\n \n \nif d < c:\n print('Yes')\nelse:\n print('No')", "x = input().split()\ns = input()\nn = int(x[0])\na = int(x[1])\nb = int(x...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s080569612', 's256217192', 's458627946', 's546354949', 's565416107', 's615825955', 's812143658', 's385505401']
[3572.0, 3636.0, 3060.0, 3064.0, 3636.0, 3636.0, 11316.0, 3636.0]
[18.0, 21.0, 17.0, 19.0, 19.0, 19.0, 2104.0, 18.0]
[264, 485, 448, 470, 451, 575, 598, 511]
p03017
u522266410
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()\ne = 0\nif c<d:\n if s[a:c+1].count("##")==0 and s[b:d+1].count("##")==0:\n print("Yes")\n else:\n print("No")\nelse:\n for i in range(b,d+1):\n if s[i-1:i+2]=="...":\n e = 1 \n if e = 1:\n print("Yes")\n elif:\n print("No")', 's = ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s282617046', 's366839401', 's392694707', 's553752279', 's977039369']
[2940.0, 2940.0, 2940.0, 3572.0, 3636.0]
[18.0, 17.0, 18.0, 240.0, 19.0]
[295, 260, 310, 292, 310]
p03017
u539692012
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\nif '##' in s[a:c] or '##' in s[b:d] or not (d < c and '...' in s[b-1:d+2]):\n print('No')\nelse:\n print('Yes')\n", "n, a, b, c, d = map(int, input().split())\ns = input()\ns = '.' + s\nif '##' in s[a:c] or '##' in s[b:d] or d < c and '...' no...
['Wrong Answer', 'Accepted']
['s913747767', 's404395060']
[3572.0, 3572.0]
[19.0, 19.0]
[181, 178]
p03017
u544034775
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...
["m = max([c, d])\nif n>m:\n n = m\n s = s[:n]\n \nif '##' in s:\n print('No')\nelse:\n if c>d:\n if '...' in s[:d]:\n print('Yes')\n else:\n print('No')\n else:\n print('Yes') ", "m = max([c, d])\nif n>m:\n n = m\n s = s[:n]\n \nif '##' in s:\n p...
['Runtime Error', 'Runtime Error', 'Accepted']
['s760219656', 's992724930', 's575331413']
[3064.0, 2940.0, 3572.0]
[17.0, 17.0, 18.0]
[222, 218, 341]
p03017
u545368057
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 C < D:\n S_cut = S[A-1:D]\n num = S_cut.count("##")\n # print(A,B,C,D)\n print(S_cut)\n if num > 0:\n print("No")\n else:\n print("Yes")\n\nelse:\n S_cut1 = S[A-1:C]\n \n flg1 = (S_cut1.count("##") == 0)\n # S_cut2...
['Wrong Answer', 'Accepted']
['s181783590', 's602321288']
[3704.0, 3572.0]
[18.0, 18.0]
[619, 570]
p03017
u545672909
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 li():\n return list(map(int, input().split()))\n\n\nif __name__ == "__main__":\n [n, a, b, c, d] = li()\n s = input()\n if c < d:\n route = s[a:d - 1]\n print(route)\n possible = True\n before = "."\n for si in s:\n if before == si == "#":\n ...
['Wrong Answer', 'Accepted']
['s704187285', 's162530732']
[4020.0, 3572.0]
[136.0, 65.0]
[1210, 1220]
p03017
u561083515
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\ndef can(start, end):\n for i in range(start, end):\n if S[i] == S[i + 1] == "#":\n return False\n return True\n\ndef main():\n if not (can(A, C) and can(B, D)):\n return False\n\n if C < D:\n flag = False\n ...
['Runtime Error', 'Accepted']
['s282721882', 's787419495']
[6260.0, 6284.0]
[74.0, 74.0]
[576, 552]
p03017
u561339958
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:c]:\n print("No")\n exit()\nelif "##" in s[b:d]:\n print("No")\n exit()\nelif c > d:\n if "..." in s[b-2:d+1]:\n print("Yes")\n exit()\nelse:\n print("No")\n', 'n,a,b,c,d = map(int,input().split())\ns = input()\nif "##" in s[a:c]:\n print(...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s286067211', 's342594256', 's500647134']
[3572.0, 3572.0, 3572.0]
[18.0, 19.0, 19.0]
[221, 230, 285]
p03017
u569970656
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:\n\tprint('No')\nelif d<c:\n\tif not '...' in S:\n \tprint ('No')\n\tif d <= n and S[d]=='#' and d-2 >= 0 and S[d-2]=='#':\n\t\tprint('No')\nelse:\n\tprint('Yes')\n\n", "n, a, b, c, d = (map(int, input().split()))\nS = input()\nimport re\nif '#...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s190476875', 's405465145', 's657545136', 's532244291']
[2940.0, 2940.0, 2940.0, 3572.0]
[17.0, 17.0, 17.0, 18.0]
[221, 182, 221, 194]
p03017
u573272932
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...
['if "##" in S[A-1:C]:\n\tprint("No")\nelif "##" in S[B-1:D]:\n\tprint("No")\nelif D < C:\t# A jumps over B\n\tif not "..." in S[B-2:D+1]:\n\t\tprint("No")\n\telse:\n\t\tprint("Yes")\nelse:\n\tprint("Yes")', 'if "##" in S[A-1:C]:\n\tprint("No")\nelif "##" in S[B-1:D]:\n\tprint("No")\nelif D < C:\t# A jumps over B\n\tif...
['Runtime Error', 'Runtime Error', 'Accepted']
['s537802225', 's849673751', 's386808888']
[2940.0, 3064.0, 3572.0]
[17.0, 19.0, 19.0]
[183, 279, 243]
p03017
u583276018
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...
['m, a, b, c, d = [int(i) for i in input().split()]\ns = input()\nif(c<d):\n print("YES")\nelse:\n if(\'...\' in s[b-2:d+1]) == 1 and (\'##\' in s[b-2:d]) == 0:\n print("YES")\n else:\n print("NO")\n \n ', 'n, a, b, c, d = map(int, input().split())\ns = list(input())\nlast = ""\nfor i in range(a, max(c, d)...
['Wrong Answer', 'Accepted']
['s115465215', 's805193750']
[3572.0, 4916.0]
[18.0, 101.0]
[200, 713]
p03017
u591589288
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 \nimport sys\nimport re\n \n_,a,b,c,d = [ int(x)-1 for x in sys.stdin.readline().split() ]\nm = sys.stdin.readline().strip()\n#\nif c>d:\n if m[b-1:d+2].find("...")<0:\n print( "No" )\n exit()\nelse:\n # b -> d\n if m[b+1:d].find("##")<0:\n print( "No" )\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s147117567', 's267940787', 's577451192', 's968974886', 's214024835']
[3700.0, 3700.0, 3700.0, 3188.0, 3700.0]
[20.0, 25.0, 21.0, 20.0, 20.0]
[411, 699, 665, 441, 413]
p03017
u594244257
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 solve():\n N,A,B,C,D = [int(s) for s in input().split() if s]\n S = input()\n \n flag = True\n for i in range(B+1, max(C,D)-1):\n if S[i] == '#' and S[i+1] == '#':\n flag = False\n \n if C > D:\n flag = False\n for i in range(B+1, max(C,D)-2):\n if S...
['Wrong Answer', 'Accepted']
['s854926941', 's190974319']
[3572.0, 3572.0]
[45.0, 43.0]
[430, 443]
p03017
u597455618
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()\nss = s[min(a-1, b-1): max(c, d)]\nif ss.count("##") or ((d < c and ss.count("...") == 0) or c < d):\n print("No")\nelse:\n print("Yes")\n', 'n, a, b, c, d = map(int, input().split())\ns = input()\nif ("##" in s[min(a, b): max(c, d)]) or (d < c and "..." no...
['Wrong Answer', 'Accepted']
['s046324456', 's960017704']
[9364.0, 9444.0]
[30.0, 30.0]
[192, 170]
p03017
u600402037
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()\nif d > c:\n for i in range(a, d-1):\n if s[i-1] == s[i] == "#":\n print("No")\n break\n else:\n print("Yes")\nelse:\n for i in range(a, c):\n if s[i-1] == s[i] == "#":\n print("No")\n ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s324426615', 's623555135', 's635802714', 's489949184']
[3060.0, 3188.0, 3064.0, 3572.0]
[17.0, 18.0, 17.0, 58.0]
[492, 569, 648, 575]
p03017
u603958124
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 bisect,copy,heapq,itertools,string\nfrom collections import *\nfrom math import *\nimport sys\ndef input() : return sys.stdin.readline().strip()\ndef INT() : return int(input())\ndef MAP() : return map(int,input().split())\ndef LIST() : return list(MAP())\n\nn, a, b, c, d = MAP()\ns = input()\n\nflag = 0\...
['Runtime Error', 'Accepted']
['s471947620', 's928692268']
[10416.0, 10300.0]
[153.0, 145.0]
[636, 642]
p03017
u610956125
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"""\nCreated on Sun Jun 2 22:01:55 2019\n\n@author: hisaki\n"""\n\nimport sys\nN, A, B, C, D = map(int, input().split())\nS = input()\nA_start = A -1\nB_start = B -1\nA_goal = C -1\nB_goal = D -1\n\nA_pos = A_start\nB_pos = B_start\n\nflag = True\nfor i in range(A_goal):\n if i< A_goal-1 ...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s062214867', 's401360464', 's662309280', 's778599680', 's812785146', 's977979245', 's984963361']
[3064.0, 3700.0, 4304.0, 4304.0, 4304.0, 3064.0, 3572.0]
[17.0, 117.0, 120.0, 87.0, 121.0, 17.0, 69.0]
[1265, 1341, 1102, 975, 1136, 1264, 808]
p03017
u616117610
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 = str(input())\nflag=1\nans = 0\nwhile(flag==1):\n flag=0\n if s.count("ABC") > 0:\n flag=1\n ans = ans+s.count("ABC")\n s.replace("ABC","BCA")\n\nprint(ans)', 'n, a, b, c, d = list(map(int, input().split()))\ns = list(str(input()))\n\nif c < d:\n ans = "Yes"\n for i in range(a,d-1)...
['Wrong Answer', 'Accepted']
['s772551471', 's905704879']
[3060.0, 4916.0]
[17.0, 60.0]
[176, 444]
p03017
u617228707
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 = input() \nfound = False\ncount = 0\nwhile not found:\n n = A.count("ABC")\n if n == 0:\n found = True\n else:\n count += n\n A = A.replace("ABC","BCA")\nprint(count)', 'N,A,B,C,D = map(int,input().split())\na = input()\nk = A\nfound = True\nffond = False\nb = 0\nc = 0\nif C <D :\n ...
['Wrong Answer', 'Accepted']
['s781360029', 's251500705']
[3060.0, 3572.0]
[17.0, 119.0]
[189, 777]
p03017
u618107373
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(100000)\n\ndef intinput(): return map(int,input().split())\n\ndef x(s):\n try:\n s.index("##")\n except:\n return True\n else:\n return False\n\nn,a,b,c,d=intinput()\ns=input()\nif c<d:\n if x(s):\n print("No")\n else:\n print("Yes")\...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s529898762', 's907999065', 's566137589']
[3572.0, 4020.0, 3572.0]
[19.0, 18.0, 18.0]
[477, 507, 483]
p03017
u619144316
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())\nS = ['#'].expand(S)\nprint(S)\n\nflg = 1\nfor i in range(a-1,c-2):\n if S[i:i+2] == ['#','#']:\n flg *= 0\n\nfor i in range(b-1,d-2):\n if S[i:i+2] == ['#','#']:\n flg *= 0\n\nif c>d:\n flg2 = 0\n for i in range(b-1,d):\n if S[i...
['Runtime Error', 'Accepted']
['s620013821', 's037114422']
[10700.0, 10740.0]
[30.0, 97.0]
[416, 387]
p03017
u619379081
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()\nif '##' in s[a-1:max(c, d)]:\n out = 'No'\nelif c < d:\n out = 'Yes'\nelif '...' in s[b-2:d]:\n out = 'Yes'\nelse:\n out = 'No'", "n, a, b, c, d = list(map(int, input().split()))\ns = input()\nif '##' in s[a-1:max(c, d)]:\n out = 'No'\nelif ...
['Wrong Answer', 'Accepted']
['s743888154', 's495308312']
[3700.0, 3572.0]
[20.0, 18.0]
[192, 205]
p03017
u622045059
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 fractions\nimport bisect\nimport collections\nimport itertools\nimport heapq\nimport string\nimport sys\nimport copy\nfrom decimal import *\nfrom collections import deque\nsys.setrecursionlimit(10**7)\nMOD = 10**9+7\nINF = float('inf') \ndef gcd(a,b):return fractions.gcd(a,b) \ndef lcm(a,b):return...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s210036589', 's539918158', 's897449308']
[7212.0, 7208.0, 7208.0]
[78.0, 75.0, 83.0]
[3376, 2649, 2676]
p03017
u623231048
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\nmax1 = 0\nmax2 = 0\ncount = 0\n\nprint(s[a-1:max(c,d)])\nfor i in s[a-1:max(c,d)]:\n if i == '#':\n count += 1\n else:\n max1 = max(max1,count)\n count = 0\n\ncount = 0\n\nprint(s[b-2:d+1])\nfor i in s[b-2:d+1]:\n if i == '.':\n ...
['Wrong Answer', 'Accepted']
['s205454615', 's386881032']
[3968.0, 3572.0]
[88.0, 19.0]
[535, 186]
p03017
u631934736
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\ndef judgeArrive(S , x , y):\n flag = "Yes"\n while flag == "Yes" and (not x == y):\n if S[x:x+2] == "##":\n flag = "No"\n print(x)\n elif S[x:x+2] == "#.":\n x +=2\n print(x)\n elif S[x:x+2] == "..":\n x +=2\n...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s324076740', 's790825439', 's897015115', 's556391935']
[16800.0, 5044.0, 4700.0, 3640.0]
[2104.0, 296.0, 194.0, 58.0]
[706, 854, 748, 575]
p03017
u638456847
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()\nindex = [(n+1) for n, v in enumerate(s) if s[n:n+3] == "..."]\n\nif s.count("##")>=1:\n print("No")\n exit()\n\nif C < D:\n print("Yes")\n\nelif C > D:\n if len(index)>=1:\n for i in range(B-1:D):\n if s[i-1]=="." and s[i]=="." and s[i+...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s030823924', 's193362981', 's275026810', 's290583695', 's566805255', 's499922839']
[2940.0, 3572.0, 3512.0, 3572.0, 3572.0, 3572.0]
[17.0, 53.0, 66.0, 65.0, 65.0, 66.0]
[415, 395, 387, 414, 391, 475]
p03017
u638795007
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()\nans = 0\ncntA = 0\nfor i in range(0, len(s) - 1):\n if s[i] == \'A\':\n cntA += 1\n elif s[i: i + 2] == "BC":\n ans += cntA\n elif i > 0 and s[i - 1: i + 1] == "BC":\n continue\n else:\n cntA = 0\nprint(ans)', 'using namespace std;\n \nint main() {\n int N, A, B...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s107219311', 's533494809', 's861867194']
[3060.0, 2940.0, 3572.0]
[17.0, 17.0, 19.0]
[246, 309, 541]
p03017
u644360640
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 judge1(x,y,s):\n count = 0\n slice = s[x:y+1]\n print(slice)\n slice2 = [slice[i:i+2] for i in range(0,y-x+1,2)]\n return slice2\ndef judge1(x,y,s):\n count = 0\n slice = s[x:y+1]\n print(slice)\n slice2 = [slice[i:i+3] for i in range(0,y-x+1,3)]\n print(slice2)\n return slice2\n\...
['Wrong Answer', 'Accepted']
['s417311914', 's559297920']
[9332.0, 3572.0]
[52.0, 60.0]
[769, 727]
p03017
u652057333
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\nflag = True\n# B -> D\ns_bd = s[b:d-1]\nfor i in range(len(s_bd)-1):\n if s_bd[i:i+2] == "##":\n flag = False\n break\n# A -> C\ns_ac = s[a:c-1]\nif flag:\n for i in range(len(s_ac)-1):\n if s_ac[i:i+2] == "##":\n fla...
['Wrong Answer', 'Accepted']
['s087414497', 's109356847']
[4020.0, 3636.0]
[97.0, 89.0]
[612, 655]
p03017
u667024514
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())\nif "##" in s[min(a,b):max(c,d)-1]:\n print("No")\n exit()\nif d > c:\n if "..." in s[b-2:d+1]:\n print("Yes")\n else:\n print("No")\nelse:\n print("Yes")\n', 'n,a,b,c,d = map(int,input().split())\ns = str(input())\nif "##" in s[min(a,b)-1:max(c,d)]:\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s392409056', 's652365225', 's593009364']
[3572.0, 3572.0, 3572.0]
[18.0, 18.0, 18.0]
[210, 208, 209]
p03017
u667084803
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())\nst = input()\nif C == D :\n print("NO")\nelif C < D:\n flag = 0\n st1 = st[A:C+1]\n for i in range(len(st1)-1):\n if st1[1:i+2] == "##":\n flag = 1\n \n st1 = st[B:D+1]\n for i in range(len(st1)-1):\n if st1[i:i+2] == "##":\n flag = 1\n if flag :\n...
['Wrong Answer', 'Accepted']
['s407034941', 's346487766']
[3640.0, 3636.0]
[461.0, 89.0]
[839, 840]
p03017
u670180528
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())\nroad = input()\nif "##" in road[a-1:c-1] or "##" in road[b-1:d-1]:\n print("NO")\nelse:\n if c < d:\n print("YES")\n else:\n if "..." in road[b-2:c]:\n print("YES")\n else:print("NO")', 'print("No")', 'n,a,b,c,d = map(int,input().split())\nroad = input()\nif "##"...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s024920140', 's201828157', 's163384529']
[3572.0, 2940.0, 3636.0]
[19.0, 17.0, 19.0]
[228, 11, 298]
p03017
u674588203
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\n\nprint('No')\n", "N,A,B,C,D=map(int,input().split())\nS=input()\n\nc1=S[B-2:C].count('...')\nc2=S[A-1:D].count('##')\n\nif c2>=1:\n print('No')\n exit()\nelse:\n pass\n\nif C>D:\n if c1==0:\n print('No')\n exit()\n else:\n print('Yes')\n ...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s592749229', 's628163579', 's878774772', 's639523067']
[9336.0, 8940.0, 9288.0, 9448.0]
[29.0, 27.0, 30.0, 28.0]
[59, 243, 251, 226]
p03017
u691018832
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\nn, a, b, c, d = map(int, input().split())\ns = input()\nif '###' not in s:\n ans = 'Yes'\n if c > d:\n ans = 'Yes'\n if '...' in s:\n ans = 'Yes'\n else:\n ans = 'No'\n else:\n ans = 'No'\nelse:\n ans = 'No' \nprin...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s272787702', 's483084248', 's930750265']
[3316.0, 3384.0, 3572.0]
[20.0, 19.0, 19.0]
[307, 359, 270]
p03017
u693953100
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\ndef solve():\n n,a,b,c,d = map(int,input().split())\n s = input()\n \n flag1 = True\n \n flag2 = True\n \n flag3 = False\n cnt = 0\n for i in range(a-1,c):\n if s[i]==\'#\':\n cnt+=1\n else:\n cnt=0\n if cnt>=2:\n ...
['Wrong Answer', 'Accepted']
['s196314103', 's218379385']
[3956.0, 3828.0]
[265.0, 53.0]
[2332, 1115]
p03017
u698176039
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\nimport sys\nif B > C:\n isi = 0\n cnt = 0\n for j in range(A-1,C):\n i = S[j]\n if i == '.':\n cnt = 0\n elif i == '#':\n cnt += 1\n isi = max(isi,cnt)\n cnt = 0\n for j in range(B-1,D):\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s581293517', 's648486411', 's333723376']
[4984.0, 4984.0, 4984.0]
[117.0, 132.0, 136.0]
[1041, 1048, 1048]
p03017
u702582248
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 inverse(a):\n return pow(a, mod - 2, mod)\n\ndef main():\n n,a,b,c,d = map(int, input().split())\n a -=1\n b -=1\n c -=1\n d -=1\n\n s = input()\n\n a_r = a\n cnt = 0\n for i in range(a, n):\n if s[i] == '#':\n cnt += 1\n else:\n cnt = 0\n a...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s941251974', 's971586789', 's053066431']
[3640.0, 3640.0, 3700.0]
[50.0, 50.0, 58.0]
[1157, 1157, 1042]
p03017
u713728708
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()\npathA=s[a-1:c-1]\npathB=s[b-1:d-1]\nisBlockCont = pathA.count("##") == 0 and pathB.count("##") == 0\nprint("Yes")\nif c < d :\n if isBlockCont:\n print("Yes")\n else:\n print("No")\nelse:\n if isBlockCont and s[b-2:d].count("...") > 0 and n >= 1...
['Wrong Answer', 'Accepted']
['s887063068', 's012897951']
[3576.0, 3636.0]
[18.0, 19.0]
[363, 336]
p03017
u729133443
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();t=s[b-2:d+1];print('YNeos'['##'*(not'...'*(d<c)in t)in s[a:c]+t::2])", "n,s=open(0);n,a,*_,d=map(int,n.split());print('YNeos'['", "n,s=open(0);n,a,b,c,d=map(int,n.split());print('YNeos'[id(d<c)%3*'#'in s[a:d]::2])", "n,a,b,c,d=map(int,input().split());s=input();t=[b-2:d+1]...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s089697553', 's320981263', 's818460667', 's906714826', 's629885374']
[3644.0, 3508.0, 3508.0, 2940.0, 3508.0]
[18.0, 18.0, 18.0, 17.0, 18.0]
[113, 88, 82, 112, 100]
p03017
u729417323
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 heapq\n\n\ndef f(S, N, A, B, C, D):\n if B > C:\n if g(S, A, C) or g(S, C, D):\n return 'No'\n else:\n return 'Yes'\n \n elif C < D:\n if g(S, A, D):\n return 'No'\n else:\n return 'Yes'\n \n else:\n if g(...
['Wrong Answer', 'Accepted']
['s524378717', 's881281732']
[3064.0, 3572.0]
[19.0, 35.0]
[812, 862]
p03017
u731368968
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\n\nif a > b:\n a, b, c, d = b, a, d, c\n\ndef search(start, goal):\n for i in range(start+1, goal - 2):\n if s[i] + s[i + 1] == '##': return False\n return True\n\n\ndef search3(start, goal):\n for i in range(start, goal -3):\n if s[i]...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s328820660', 's624856279', 's715781837', 's614129132']
[3572.0, 3572.0, 3572.0, 3572.0]
[20.0, 19.0, 55.0, 18.0]
[504, 504, 572, 389]
p03017
u741495664
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_ = list(S)\ncross = False\nminS = A\nmaxS = B\nminG = C\nmaxG = D\n\nif C < D:\n if A > B:\n maxS = A\n minS = B\n cross = True\nelse:\n minG = D\n maxG = C\n if A < B:\n cross = True\n\nwall = S.find("##")\neven = S.find("...")\n\nif cross == False:\n if wall == -1:\n ...
['Runtime Error', 'Accepted']
['s649598726', 's006009096']
[3064.0, 3572.0]
[17.0, 19.0]
[533, 473]
p03017
u745561510
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...
['\nimport sys\nsys.setrecursionlimit(100000000)\n\nN, A, B, C, D = map(int, input().split())\ns = list(input())\n\nA -= 1\nB -= 1\nC -= 1\nD -= 1\n\nfor i in len(s):\n if i == len(s) - 1:\n continue\n else:\n if s[i] == \'#\' and s[i+1] == \'#\':\n print("No")\n exit()\n\n\n\n...
['Runtime Error', 'Accepted']
['s472790862', 's824567927']
[4916.0, 104456.0]
[21.0, 462.0]
[709, 854]
p03017
u746206084
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 or (c>d and "..." in s[b:d+1]):\n if "##" not in s[b+1:d+1] and s[d-1]!="#":\n s=s[:d]+"#"+s[d+1:]\n if "##" not in s[a:c+1] and s[c-1]!="#":\n print("YES")\n else:\n print("NO")\n else:\n print("NO")\nelse...
['Wrong Answer', 'Accepted']
['s127681737', 's503920554']
[3576.0, 3572.0]
[19.0, 19.0]
[324, 214]
p03017
u747184036
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(10 ** 5)\n\n\ndef LI(): return [int(x) for x in sys.stdin.readline().split()]\n\n\ndef SI(): return input()\n\n\ndef main():\n N, A, B, C, D = LI()\n S = SI()\n\n M = [0 for _ in range(A-1)]\n a = 0\n for s in S[A-1:max(C, D)]:\n if s == ".":\n a = 0\...
['Wrong Answer', 'Accepted']
['s816234478', 's099969799']
[3064.0, 5172.0]
[17.0, 49.0]
[824, 783]
p03017
u751724075
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\nA -= 1\nB -= 1\nC -= 1\nD -= 1\n\ndef check2():\n\tfor i in range(A, C - 1):\n\t\tif S[i] == S[i + 1] == "#":\n\t\t\treturn False\n\t\n\tif D < C:\n\t\tfor i in range(B, D):\n\t\t\tif S[i - 1] == S[i] == S[i + 1] == ".":\n\t\t\t\treturn True\n\t\treturn False\...
['Runtime Error', 'Accepted']
['s361989791', 's432140697']
[3572.0, 3572.0]
[18.0, 71.0]
[349, 434]
p03017
u760961723
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 = A-1\nb = B-1\nc = C-1\nd = D-1\n\nans = 1\n\nfor i_a in range(a,C):\n \n if S[i_a] == "#":\n if S[i_a+1] == "#":\n ans =0\n\nfor i_b in range(b,D):\n \n if S[i_b] == "#":\n if S[i_b+1] == "#":\n ans =0\n\nif D < C:\n ans = 0\n for ...
['Runtime Error', 'Accepted']
['s923267552', 's006820722']
[3064.0, 4916.0]
[17.0, 74.0]
[564, 562]
p03017
u761989513
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())\nprint("No")\n', 'n, a, b, c, d = map(int, input().split())\ns = list(input())\nlast = ""\nfor i in range(a, max(c, d)):\n if last == "#" and s[i] == "#":\n print("No")\n exit()\n last = s[i]\nflag = False\nif c > d:\n s[b - 1] = "#"\...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s473157854', 's788666996', 's987945249', 's009646993']
[4856.0, 4916.0, 4916.0, 4984.0]
[21.0, 97.0, 21.0, 89.0]
[72, 735, 72, 713]
p03017
u764600134
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\nimport sys\n\n\ndef solve(N, A, B, C, D, S):\n p_A = set([A])\n for p, n1, n2 in zip(range(A, C-1), S[A+1:], S[A+2:]):\n if p in p_A:\n if n1 == '.' and p+1:\n p_A.add(p+1)\n if n2 == '.' and p+2:\n p_A.add(p+2)\n\n p_B = s...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s728749266', 's915977257', 's254668583']
[15184.0, 15188.0, 15244.0]
[95.0, 94.0, 96.0]
[1179, 1163, 1189]
p03017
u785213188
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())\nN-=1\nA-=1\nB-=1\nC-=1\nD-=1\nS = input()\n\nmassesExist = True\novertakeFlag = False if C > D else True\nproceedableFlag = True\n\nif max(A, B, C, D) > N:\n massesExist = False\n\nfor i in range(B, D+1):\n if S[i-1] == "." and S[i] == "." and S[i+1] == ".":\n o...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s919050184', 's944638261', 's956814404']
[9384.0, 9496.0, 9416.0]
[66.0, 71.0, 60.0]
[512, 511, 461]
p03017
u785578220
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', '\nN,A,B,C,D = map(int,input().split())\na= input()\nf = 0\ns = 0\nd = 1\nt = []\nk = []\n\nf1 = 0\ns1 = 0\nd1 = 1\nt1 = []\nk1 = []\n\n\nfor i in a[A-1:C]:\n if i == "." and f ==1:\n k.append(d)\n s = 1\n f = 0\n elif i == ".":s+=1\n \n elif i == "#" and f==0:\n t.append(s...
['Runtime Error', 'Accepted']
['s843837668', 's077643772']
[2940.0, 5520.0]
[17.0, 96.0]
[3, 1033]
p03017
u802963389
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\ns_cnt = 0\nmax_s_cnt = 0\npre_s = \'\'\n\ngoal = max(C, D)\n\nif C < B:\n for i in range(A-1, C):\n if pre_s == "#":\n if S[i] == "#":\n print("No")\n exit()\n pre_s = S[i]\n for i in range(B-1, D):\n if pre_s == "#":\n if S[...
['Wrong Answer', 'Accepted']
['s461272661', 's629514238']
[4408.0, 3572.0]
[230.0, 101.0]
[763, 765]
p03017
u806779442
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\nflg = 0\n\nif C < D:\n cnt = 0\n for i in range(A, D):\n if S[i] == '#':\n cnt += 1\n else:\n cnt = 0\n if cnt == 2:\n flg = 1\n break\n\nelse:\n cnt = 0\n flg = 1\n for i in range...
['Runtime Error', 'Accepted']
['s255942118', 's248868388']
[2940.0, 3572.0]
[17.0, 19.0]
[500, 274]
p03017
u811132356
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=list(s)\ns.append('#')\ns.append('#')\nct=0\nif c<d:\n for i in range(a-1,c):\n if s[i]=='#' and s[i+1]=='#':\n print('No')\n ct+=1\n break\n for i in range(b-1,d):\n if s[i]=='#' and s[i+1]=='#':\n print(...
['Wrong Answer', 'Accepted']
['s154689851', 's624813093']
[4916.0, 4916.0]
[65.0, 70.0]
[779, 687]
p03017
u814663076
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\nrr = lambda: sys.stdin.readline().strip()\nrri = lambda: int(rr())\nrrs = lambda: [int(_) for _ in rr().split()]\n\nN, A_, B_, C_, D_ = rrs()\nA, B, C, D = [i-1 for i in [A_, B_, C_, D_]]\nS = rr()\n\nfor i in range(1, N):\n\tif S[i] == '#' and S[i-1] == '#':\n\t\tprint('No')\n\t\tsys.exit()\n\nif C < D:\...
['Runtime Error', 'Accepted']
['s507449423', 's307781968']
[3064.0, 3572.0]
[19.0, 58.0]
[651, 611]
p03017
u815797488
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 \ndef step(x,y):\n N_last = S[x:y-1]\n return N_last.find('##') == -1\n \n \npass_path = False\nif C > D:\n for b in range(B-1,D):\n if S[b-1] == '.' and S[b+1] == '.':\n pass_path = True\n break\n elif S[b] == '#':\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s020789870', 's088121702', 's429299142', 's548080962', 's691761149', 's719121381', 's898473172', 's969466899', 's031407663']
[3636.0, 3636.0, 3636.0, 3060.0, 3636.0, 2940.0, 3636.0, 3572.0, 3636.0]
[18.0, 19.0, 19.0, 17.0, 32.0, 17.0, 32.0, 19.0, 34.0]
[389, 448, 404, 374, 504, 411, 409, 408, 456]
p03017
u815878613
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 = list(map(int, input().split()))\n\nS = input()\n\n\nfor i in range(A,max(C,D)):\n if S[i:i+2] == '##':\n print('NO')\n sys.exit()\n\n\np = 0\nif A < B and C > D:\n p = 1\n\nif C > D:\n for i in range(B,min(C,D)):\n if S[i:i+3] == '...':\n print('...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s328439745', 's358761497', 's532009825', 's585124382', 's765250421', 's411922941']
[3572.0, 3572.0, 3572.0, 3572.0, 3572.0, 3520.0]
[87.0, 106.0, 106.0, 91.0, 89.0, 76.0]
[416, 444, 389, 414, 412, 746]
p03017
u819225206
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,Q,D = map(int,input().split())\nS = input()\nC = []\nfor i in range(len(S)):\n C.append(S[i])\n\nif Q<D:\n error = 0\n for i in range(B,C):\n if C[i]=="#" and C[i+1]=="#":\n error = 1\n break\nelse:\n error = 0\n for i in range(B,D):\n if C[i]=="#" and C[i+1]==...
['Runtime Error', 'Accepted']
['s365559968', 's630832367']
[4924.0, 4924.0]
[68.0, 76.0]
[549, 555]
p03017
u821251381
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()\nF = True\n\nif ("##" in S[B-1:D]) or ("##" in S[A-1:C]):\n F =False\n\n\n\n\nif C > D and ("..." not in S[B-1-1:D+1]): \n F = False\nprint(S[B-1-1:D+2])\n\nprint("Yes" if F else "No")\n', 'N,A,B,C,D = map(int,input().split())\nS = input()\nF = True\n\nif ("##" i...
['Wrong Answer', 'Accepted']
['s639939954', 's359530501']
[3588.0, 3572.0]
[19.0, 19.0]
[464, 465]
p03017
u830054172
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\njump = 0\nif c < d:\n for i in range(a, d-2):\n if s[i] == s[i+1] == "#":\n print("No")\n break\nelse:\n for i in range(a, d-2):\n if s[i] == s[i+1] == "#":\n print("No")\n break\n el...
['Wrong Answer', 'Accepted']
['s405831626', 's333326721']
[3572.0, 3572.0]
[2104.0, 78.0]
[549, 514]
p03017
u850266651
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")\nelse:\n S = S[:max(C, D)-1]\n if "..." in S:\n print("YES")\n else:\n if C < D:\n print("YES")\n else:\n print("NO")', 'N, A, B, C, D = map(int, input().split())\nS = input()\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s127596128', 's141661190', 's251319063']
[3572.0, 3516.0, 3572.0]
[18.0, 19.0, 19.0]
[245, 255, 351]
p03017
u866769581
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()\nflg = False\nif c < d:\n \n flg = True\nelse:#c>d\n if '...' in s[a-1:]:\n flg = True\n if not('...' in s[:d-1]):\n flg = False\n else if ('...' in s[a-1:b]):\n flg = False\nif '##' in s:\n flg = False\nif flg:\n...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s120163615', 's367312928', 's600522401', 's795266827', 's990600854', 's467965194']
[2940.0, 2940.0, 3572.0, 3640.0, 3572.0, 3572.0]
[17.0, 18.0, 19.0, 19.0, 19.0, 18.0]
[363, 384, 396, 396, 193, 263]
p03017
u867736259
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:\n print('No')\nelse:\n if C > D:\n if '...' in s[B-1:D]:\n print('Yes')\n else:\n print('No')\n else:\n print('Yes')\nprint(s[B-1:D])", "N,A,B,C,D = map(int,input().split())\ns = input()\nif ('##' in s...
['Wrong Answer', 'Accepted']
['s232712014', 's943356307']
[3716.0, 3572.0]
[18.0, 19.0]
[238, 251]
p03017
u879870653
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\n\nif S[A:max(C,D)+1].count("##") == 0 :\n elif C < D :\n print("Yes")\n else :\n if S[B-1:D+2].count("...") :\n print("Yes")\n else :\n print("No")\nelse :\n print("No")', 'N,A,B,C,D ...
['Runtime Error', 'Accepted']
['s837339461', 's894293552']
[2940.0, 3572.0]
[17.0, 18.0]
[288, 286]
p03017
u884692162
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\nsr = lambda: sys.stdin.readline().rstrip()\nir = lambda: int(sr())\nlr = lambda: list(map(int, sr().split()))\n\nN, A, B, C, D = lr()\nS = input()\n# if C > D:\n# if "..." not in S[B-1:D]:\n# print("No")\n# exit(0)\n# if "##" in S[A-1:C] or "##" in S[B-1:D]:\n# print("No")\n# els...
['Wrong Answer', 'Accepted']
['s427636305', 's934591393']
[3640.0, 3572.0]
[20.0, 18.0]
[491, 625]
p03017
u895515293
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...
["\nif C < D:\n if st[A:C].find('##') >= 0 or st[B:D].find('##') >= 0:\n print('No')\n else:\n print('Yes')\nelse:\n \n if st[A:C].find('##') >= 0:\n print('No')\n else:\n fnd = st.find('...', B-1, D+1)\n if fnd >= 0:\n print('Yes')\n else:\n ...
['Runtime Error', 'Accepted']
['s469454531', 's050753302']
[3060.0, 3572.0]
[20.0, 18.0]
[365, 833]
p03017
u896741788
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()\nif c<=b:\n if "##"in s[a-1:c] or"##"in s[b-1:d]:print("No")\n else:print("Yes")\nelse:\n if "..." not in s[b-1:d]:print("No");exit()\n if "##"in s[a-1:max(c,d)]:print("No")\n else:print("Yes")', 'n,a,b,c,d=map(int,input().split());s=input()\nif c<=d:\n if "##"in s[a...
['Wrong Answer', 'Accepted']
['s122005440', 's513059240']
[3572.0, 3572.0]
[18.0, 18.0]
[236, 257]
p03017
u899929023
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 = int(input())\nA = list(map(lambda x: int(x),input().split()))\n\njudge=False\n#print(A)\n\nfor i in range(1,N):\n left = A[0]\n right = A[i]\n tmp_1=A[:]\n #print(tmp_1)\n tmp_1.remove(right)\n tmp_1.remove(left)\n tmp_2=[]\n isAble=True\n while isAble:\n #print(tmp_1)\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s526938532', 's674185807', 's678854471']
[3064.0, 3572.0, 3572.0]
[17.0, 17.0, 19.0]
[672, 200, 256]
p03017
u905268546
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 A < C < B < D:\n if not (S.find("##", A - 1) < C - 1 and S.find("##", A - 1) != -1) and not (\n S.find("##", B - 1) < D - 1 and S.find("##", B - 1) != -1):\n print("Yes")\n else:\n print("No")\nelif C < D:\n if S.find("##",...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s365407731', 's886024134', 's962905197']
[3572.0, 3572.0, 3572.0]
[19.0, 19.0, 19.0]
[641, 375, 641]
p03017
u905582793
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\nN,A,B,C,D = map(int, input().split())\nS = input()\nNG = N+3\nOOmin = N+2\nOOmax = 0\nfor i in range(N-1):\n if S[i] == S[i+1] == \'#\':\n if i+1 < C or i+1 < D:\n print("No")\n sys.exit()\n if i+1 > A:\n print("No")\n sys.exit()\nfor i in range(N-2):\n if S[i] == S[i+1] == S[i...
['Wrong Answer', 'Accepted']
['s289823588', 's890838784']
[3572.0, 3572.0]
[117.0, 119.0]
[503, 353]
p03017
u907223098
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()\nr="Yes"\nfor i in(a,d):\n if s[i]=="#":\n if s[i+1]=="#":\n r="No"\n break\nif r=="Yes" and c>d:\n r="No"\n for i in range(d-b+1):\n if s[i+b-2]==".":\n if s[i+b-1]==".":\n if s[i+b]==".":\n r="Yes"\n break\nprint...
['Runtime Error', 'Accepted']
['s653903091', 's253799885']
[3572.0, 3572.0]
[36.0, 66.0]
[305, 317]
p03017
u910632349
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"+input()\nx=s[a:c+1]\ny=s[b:d+1]\nif "##" in s[a:c+1]:\n print("No")\n exit()\n\nif "##" in s[b:d+1]:\n print("No")\n exit()\n\nif c>d:\n if "..." in s[b:d+1]:\n print("Yes")\n else:\n print("No")', 'n,a,b,c,d=map(int,input().split())\ns="0"+inp...
['Wrong Answer', 'Accepted']
['s413146293', 's844823069']
[9536.0, 9564.0]
[30.0, 31.0]
[253, 261]
p03017
u921773161
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...
["l = list(map(int,input().split()))\nN = l[0]\nA = l[1] \nB = l[2]\nC = l[3]\nD = l[4]\nS = input()\nS_list = list(S)\n\nif B < C < D :\n count = 0\n for i in range(A, D-2):\n if S_list[i] == S_list[i+1] == '#' :\n count += 1\n if count >= 1:\n print('No')\n else : \n print(...
['Runtime Error', 'Accepted']
['s801382082', 's667089934']
[3064.0, 4984.0]
[17.0, 74.0]
[970, 938]
p03017
u924467864
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\nflag1 = True\nflag2 = True\nflag3 = True\n\nfor i in range(b, d):\n if s[i:i+2] == "##":\n flag1 = False\nfor i in range(a, c):\n if s[i:i+2] == "##":\n flag2 = False\nfor i in range(b-2, d-1):\n if s[i:i+3] != "...":\n flag3 = ...
['Wrong Answer', 'Accepted']
['s207543177', 's956675542']
[3636.0, 3572.0]
[103.0, 102.0]
[378, 373]
p03017
u931072631
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("Yes")n,a,b,c,d = [int(i) for i in input().split()]\ns = input()\n\n\nflag1 = False\nblock = 0\nfor i in range(b, len(s)):\n if block == 2:\n flag1 = False\n break\n elif i == d-1:\n flag1 = True\n break\n elif s[i] == ".":\n block = 0\n elif s[i] == "#":\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s216957978', 's846356813', 's450710488']
[2940.0, 2940.0, 3836.0]
[17.0, 17.0, 175.0]
[1700, 10, 1652]
p03017
u933129390
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()\nrock = 0\nbrank = 0\nrfrag = 0\nbfrag = 0\nmrock = 0\nmbrank = 0\nrlist = []\nblist = []\nfor i in range(n):\n if s[i] == "#":\n if bfrag == 1:\n if brank >= 3:\n blist.append(i-brank+1)\n if mbrank < brank:\n ...
['Wrong Answer', 'Accepted']
['s083909651', 's347829008']
[3700.0, 3700.0]
[97.0, 91.0]
[1290, 1273]
p03017
u934099192
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\nN,A,B,C,D = map(int, input().split())\nS = list(input())\n\nA -= 1\nB -= 1\nC -= 1\nD -= 1\nS[A] = 'a'\nS[B] = 'b'\n\nans_D = False\nans_C = False\n\nb = B\na = A\n\nif C <= D:\n while True:\n if b == D:\n ans_D = True\n break\n else:\n if S...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s197007363', 's819867046', 's205608660']
[5052.0, 5052.0, 5052.0]
[115.0, 105.0, 113.0]
[2803, 2762, 2803]
p03017
u936985471
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,B,C,D=A-1,B-1,C-1,D-1\nS=input()\n\nAleft=A\nAright=min(S.find("\nBleft=B\nBright=min(S.find("\n\nans=True\nif C<Aleft or Aright<C:\n ans=False\nif D<Bleft or Bright<D:\n ans=False\n \nif (A-B)*(C-D)<0:\n commonL=max(Aleft,Bleft)\n commonR=min(Aright,Bright)\n if commonR<co...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s261764545', 's793483257', 's869126815', 's928354676', 's094230210']
[3572.0, 3572.0, 3572.0, 3572.0, 3572.0]
[19.0, 20.0, 19.0, 19.0, 19.0]
[503, 497, 536, 487, 389]
p03017
u939757770
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(str(x) for x in input())\n\nstart = min(a,b)\nstop = max(c,d)\nans=0\n\nif a<b and c<d:\n for i in range(start, stop):\n if s[i] == "#" and s[i+1] == "#":\n ans = "NO"\n break\n if ans == 0:\n ans = "YES"\n\nelif b<a and d<c:\n...
['Wrong Answer', 'Accepted']
['s333663977', 's544728928']
[5300.0, 5116.0]
[111.0, 112.0]
[1345, 1345]
p03017
u944325914
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=[0]+list(input())\nif c<d:\n for i in range(a,d):\n if s[i]==s[i+1]=="#":\n print("No")\n break\n else:\n print("Yes")\nelse:\n for j in range(a,c):\n if s[j]==s[j+1]=="#":\n print("No")\n break\n else:\n for k in range(b-1,d-2):\n ...
['Runtime Error', 'Accepted']
['s549568923', 's042184733']
[9000.0, 12020.0]
[27.0, 113.0]
[440, 473]
p03017
u952708174
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 a_kenken_race(N, A, B, C, D, S):\n \n \n cond1 = S[A:C + 1].count('##') == 0 and S[B:D + 1].count('##') == 0\n cond2 = S[B:D + 1].count('...') >= 1\n if C < D:\n \n ans = 'Yes' if cond1 else 'No'\n else:\n \n ans = 'Yes' if cond1 and cond2 else 'No'\n return ans\n\...
['Runtime Error', 'Accepted']
['s483979019', 's632020890']
[3064.0, 3572.0]
[17.0, 19.0]
[737, 670]
p03017
u965436898
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())\nans = "Yes"\nis_reversed = False\nflag = False\n\nif D < C:\n is_reversed = True\n\nfor i in range(A,max(C,D) -1):\n if S[i] == S[i + 1] == "#":\n ans = "No"\nif is_reversed == True:\n for i in range(B - 2,D - 1):\n if S[i] == S[i + 1] == S[i + 2] == "...
['Runtime Error', 'Runtime Error', 'Accepted']
['s755744661', 's764312743', 's139779210']
[3060.0, 4916.0, 4916.0]
[17.0, 83.0, 71.0]
[355, 360, 600]
p03017
u967835038
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...
["number_of_masu, firstsunuke, firstfunuke, lastsunuke, lastfunuke = map(int, input().split())\ns = str(input())\ntobenaiflag = 0\nnukaseruflag = 0\nlastfunuke -= 1\nlastsunuke -= 1\nfirstsunuke -= 1\nfirstfunuke -= 1\n\n\n# if s[i] == '#' and s[i+1] == '#':\n\n# break\n# for k in range(firstfunuke, lastfunuk...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s599912363', 's733580140', 's763771706']
[3572.0, 3572.0, 3636.0]
[30.0, 29.0, 72.0]
[807, 789, 785]
p03017
u970899068
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()\nv=0\nx=0\nfor i in range(n-2):\n if c<d:\n if i>b and i<d and s[i]=='#' and s[i+1]=='#':\n print('No')\n v+=1\n break\n\n \n elif c>d:\n if i>=b-1 and i<d+1 and s[i]=='.' and s[i+1]=='.' and s[i+2]=='.' :\n ...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s416830621', 's426649354', 's428091413', 's462832937', 's773481370', 's892658058', 's463672957']
[3572.0, 3064.0, 3700.0, 2940.0, 3064.0, 3572.0, 3572.0]
[100.0, 17.0, 98.0, 17.0, 18.0, 128.0, 18.0]
[584, 537, 1187, 586, 526, 541, 333]
p03017
u975658594
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 inp = input()\n st = inp.split()\n n = int(st[0])\n a = int(st[1])\n b = int(st[2])\n c = int(st[3])\n d = int(st[4])\n inp = input()\n # 2 rocks\n rock_count = 0\n for i in range(a, b):\n if inp[i] == \'#\':\n rock_count += 1\n elif inp[i] == \'...
['Runtime Error', 'Runtime Error', 'Accepted']
['s915826907', 's968540571', 's106775296']
[3640.0, 3640.0, 3644.0]
[50.0, 50.0, 49.0]
[1293, 1293, 1342]
p03017
u981767024
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/06/02\n# AtCoder Grand Contest 034 - A\n\n# For the answer:\n# 1-1. Search min(ac) and max(abcd)\n# 1-2. Search ## between min and max\n# 2. Case:B<C, Left of B is . and (. or C), or exist .. -> Yes\n\n# Def 1 : True is "Case No"\ndef searchRock(in_l, in_r, in_str, in_tg):\n rcflg = False\n for i in rang...
['Runtime Error', 'Accepted']
['s952475270', 's161277764']
[3064.0, 3700.0]
[18.0, 42.0]
[1546, 1568]
p03017
u992910889
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 resolve():\n N, A, B, C, D = map(int, input().split())\n S = str(input())\n if C < D:\n if '##' in S[min(A, B):D]:\n print('No')\n else:\n print('Yes')\n elif C > D:\n if '##' in S[min(A, B):C]:\n print('No')\n else:\n if '...' in...
['Wrong Answer', 'Accepted']
['s086553536', 's500046025']
[3064.0, 3572.0]
[18.0, 18.0]
[393, 391]
p03018
u010090035
2,000
1,048,576
You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations.
["import re\ns=input()\nans=0\nmatch_s = re.search(r'A*(ABC)+(BC)*',s)\n\nwhile(True):\n if(match_s):\n abc=match_s.group()\n while(abc.find('ABC')!=-1):\n abc=abc.replace('ABC','BCA')\n ans+=1\n s=abc+s[match_s.end():]\n match_s = re.search(r'A*(ABC)+(BC)*',s)\n ...
['Wrong Answer', 'Accepted']
['s394787315', 's431065058']
[10984.0, 5476.0]
[2108.0, 53.0]
[335, 262]
p03018
u017810624
2,000
1,048,576
You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations.
["s=list(input())\nl=[]\nx=-100\nfor i in range(len(s)-1):\n if x==i:\n pass\n else:\n if s[i]=='B' and s[i+1]=='C':\n l.append('D')\n x=i+1\n else:\n l.append(s[i])\nf=0\nct=0\nfor i in range(len(l)):\n if l[i]=='A':\n f+=1\n if l[i]=='B' or l[i]=='C':\n f=0\n if l[i]=='D':\n ct+=...
['Wrong Answer', 'Accepted']
['s321639811', 's423625678']
[7328.0, 6436.0]
[302.0, 153.0]
[321, 309]
p03018
u027002244
2,000
1,048,576
You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations.
['s=list(input())\n\ni=0\nj=0\nans=0\nz=[]\nwhile i!=len(s)-2:\n try:\n if s[i]=="B" and s[i+1]=="C":\n z.append(1)\n i=i+2\n\n else:\n if s[i]=="A":\n z.append(2)\n i=i+1\n\n else:\n z.append(0)\n i...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s225710199', 's715580342', 's816547038', 's881297193', 's090406007']
[6436.0, 8356.0, 8228.0, 8356.0, 6560.0]
[183.0, 383.0, 188.0, 380.0, 184.0]
[530, 918, 532, 917, 531]
p03018
u041783158
2,000
1,048,576
You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations.
["s = input().strip().replace('BC', 'D')\nn = len(s)\n\ncount = 0\na_count = 0\nprint(s)\nfor i in range(n):\n if s[i] == 'A':\n a_count += 1\n elif a_count > 0 and s[i] == 'D':\n count += a_count\n else:\n a_count = 0\n\nprint(count)", "s = input().strip().replace('BC', 'D')\nn = len(s)\n\ncount = 0\na_cou...
['Wrong Answer', 'Accepted']
['s762124253', 's114136384']
[3560.0, 3500.0]
[52.0, 52.0]
[230, 221]
p03018
u057109575
2,000
1,048,576
You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations.
["import re\ns = input()\nans = 0\nfor v in re.finditer('(A(BC)+A?)+', s):\n sub = s[v.start():v.end()]\n total = sub.count('BC')\n abc_num = sub.count('ABC')\n ans += total * (total - 1) // 2 + abc_num\n \nprint(ans)", "s = input().replace('BC', 'D')\nans = 0\ncnt = 0\n\nfor c in s:\n if c == 'A':\n ...
['Wrong Answer', 'Accepted']
['s748535479', 's006338562']
[10980.0, 3500.0]
[54.0, 48.0]
[221, 170]
p03018
u131406102
2,000
1,048,576
You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations.
["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']
['s997185760', 's552088623']
[8384.0, 7328.0]
[98.0, 92.0]
[392, 379]
p03018
u133566678
2,000
1,048,576
You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations.
['import copy\nS = input()\n#print(S)\nS2 = S.replace("BC", "D")\n#print(S2)\nflag = 0\ncountnum = 0\nstart = -1\ncount = 0\nfor i in range(len(S2)):\n #print(S2[i])\n if S2[i] == "A" or S2[i] == "D":\n if flag == 0:\n start = i\n countnum += 1\n flag = 1\n elif flag == 1:\n ...
['Wrong Answer', 'Accepted']
['s184819419', 's885932637']
[5828.0, 4012.0]
[2104.0, 76.0]
[864, 331]