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
p02953
u141410514
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nH = list(map(int,input().split()))\n\ni = 0\nans = "Yes"\nwhile(i < N-1):\n if H[i+1]>H[i]-1:\n ans = "No"\n i += 1\nprint(ans)', 'n = int(input())\nH = list(map(int,input().split()))\nH[0] -= 1\nans = "Yes"\nfor i in range(1,n):\n if H[i] < H[i-1]:\n ans = "No"\n break...
['Wrong Answer', 'Accepted']
['s914084773', 's259295986']
[14252.0, 14396.0]
[81.0, 87.0]
[149, 201]
p02953
u141633765
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N = int(input())\nH = list(map(int, input().split())) \nH = list(reversed(H)) \nif N==1:\n ans='Yes'\nelse: \n for i in range(1, N):\n if H[i] - H[i-1] >= 2: #\n ans='No'\n break \n elif H[i] - H[i-1] == 1: # 1 smaller\n H[i] -= 1\nprint(ans) ", "N = i...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s087172007', 's153816533', 's073288092']
[14396.0, 14396.0, 14396.0]
[81.0, 73.0, 76.0]
[297, 254, 308]
p02953
u143903328
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N=int(input())\nH = list(map(int,input().split( )))\ni = 1\ns = 0\n\nwhile i < N:\n if H[i-1] + 1 < H[i]:\n s = 1\n break\n if H[i-1] - 1 > H[i]:\n s = 1\n break\n i = i+1\n\nif s == 0:\n print('Yes')\nelse:\n print('No')\n", "N=int(input())\nH = list(map(int,input().split( ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s434171925', 's876499710', 's098389223']
[14396.0, 14396.0, 14252.0]
[94.0, 68.0, 90.0]
[248, 194, 247]
p02953
u146575240
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['\nN = int(input())\nH = list(map(int,input().split()))\n\nfor i in range(N-1):\n if H[i] < H[i+1]:\n pass\n elif H[i] == H[i+1]:\n for k in range(i+1,N-1):\n if H[i] < H[k]:\n pass\n else:\n H[i] = H[i] - 1\n\n else:\n H[i] = H[i]-1\n\...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s114491100', 's166537800', 's268905662', 's361933474', 's364043278', 's392249957', 's452136636', 's499733044', 's513775458', 's520642695', 's595830659', 's629023922', 's811306853', 's970656494', 's217901277']
[14396.0, 14396.0, 14400.0, 14396.0, 14396.0, 14976.0, 14252.0, 14396.0, 14976.0, 14396.0, 14396.0, 14224.0, 14976.0, 3064.0, 14704.0]
[2104.0, 111.0, 2104.0, 101.0, 99.0, 2104.0, 98.0, 115.0, 2104.0, 97.0, 122.0, 101.0, 2104.0, 17.0, 113.0]
[501, 352, 484, 329, 353, 504, 327, 354, 500, 340, 373, 348, 500, 325, 351]
p02953
u148423304
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(inut())\nh = list(map(int, input().split()))\nt = 0\nfor i in range(n - 2):\n if h[i] - h[i+1] >= 2:\n print("No")\n t = 1\n break\n elif i <= n - 4:\n if h[i] - h[i+1] == 1 and h[i+1] - h[i+2] == 1:\n print("No")\n t = 1\n break\nif t == 0:\n...
['Runtime Error', 'Runtime Error', 'Accepted']
['s042678459', 's579195446', 's485742944']
[3060.0, 3060.0, 15020.0]
[17.0, 17.0, 65.0]
[321, 320, 218]
p02953
u149470401
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nh = list(map(int, input().split(" ")))\na = \'Yes\'\nm = max(h)\nfor i in range(1, len(h)):\n if h[i] < h[i-1] and m - h[i] > 1:\n a = \'No\'\n break\nprint(a)\n', 'n = int(input())\nh = list(map(int, input().split(" ")))\na = \'Yes\'\nm = 0\nfor i in range(1, len(h)):\n m = max(...
['Wrong Answer', 'Accepted']
['s530308431', 's172540009']
[14396.0, 14396.0]
[60.0, 83.0]
[183, 199]
p02953
u152614052
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nli = list(map(int,input().split()))\nans = "Yes"\n\nif n == 1:\n print(ans)\nelse:\n for i in range(n):\n if li[i] + 1 <= max(li[:i+1]):\n ans = "No"\n break\n\nprint(ans)', 'n = int(input())\nli = list(map(int,input().split()))\nans = "Yes"\nmax_n = 0\n\nif n == 1...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s202758185', 's639609581', 's868903799', 's055113063']
[20604.0, 20464.0, 20756.0, 20780.0]
[2206.0, 73.0, 76.0, 76.0]
[212, 220, 251, 180]
p02953
u152638361
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nH = list(map(int,input().split()))\nans ="Yes"\nfor i in range(N-1):\n if H[i+1]-H[i]>1:\n ans ="No"\n break\n\nprint(ans)', 'N = int(input())\nH = list(map(int,input().split()))\nans ="Yes"\nhighest = H[0]\nfor i in range(N-1):\n if H[i+1]<highest-1:\n ans ="No"\n ...
['Wrong Answer', 'Accepted']
['s534022385', 's821979237']
[14252.0, 14252.0]
[59.0, 89.0]
[149, 201]
p02953
u159144188
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nH = list(map(int, input().split()))\nans = True\nlis = {}\nfor i in H:\n if i in lis:\n lis[i] += 1\n else:\n lis[i] = 1\nmine = min(H)\ntimes = lis[mine]\nfor i in range(N):\n if mine < H[i]-1:\n ans = False\n break\n else:\n if H[i] == mine:\n times -= 1\n if times == 0 ...
['Runtime Error', 'Accepted']
['s134284744', 's108488264']
[22276.0, 20672.0]
[91.0, 80.0]
[464, 210]
p02953
u159975271
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nA = list(map(int, input().split()))\nif N == 1:\n print("Yes")\nelse:\n k = 0\n for i in range(N -1):\n if (A[i] - A[i+1]) >= 2:\n k += 1\n q = 0\n for j in range(N-1):\n if (A[0] - A[j+1]) >= 2:\n q += 1\n y = 0\n for x in range(N-1):\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s570426581', 's848495976', 's353299756']
[14396.0, 15020.0, 14396.0]
[114.0, 67.0, 162.0]
[438, 264, 291]
p02953
u166621202
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nH = list(map(int,input().split()))\nans = "Yes"\nfor i in range(1,N):\n if H[i] > H[i+1] + 1:\n ans = "No"\n break\nprint(ans)\n', 'N = int(input())\nH = list(map(int,input().split()))\nans = "Yes"\nfor i in range(N-1):\n if H[i] > H[i+1] - 1:\n ans = "No"\n break\n...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s597712895', 's865377183', 's168190677']
[14252.0, 14396.0, 14396.0]
[63.0, 60.0, 69.0]
[155, 194, 177]
p02953
u167647458
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["@patch('builtins.input', test.test_input)\ndef main():\n n = int(input())\n h = list(map(int, input().split()))\n \n pre = h[0]\n for hh in h:\n if hh < pre:\n if hh >= pre - 1:\n pre = hh\n else:\n print('No')\n return\n ...
['Runtime Error', 'Accepted']
['s661240890', 's218637523']
[3060.0, 14252.0]
[17.0, 62.0]
[382, 271]
p02953
u169138653
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n=int(input())\nh=list(map(int,input().split()))\nfor i in range(n):\n if h[i+1]>h[i]+1:\n print('No')\n exit()\nprint('Yes')\n ", "n=int(input())\nh=list(map(int,input().split()))\nh_=list()\ncnt=0\nfor i in range(n-1):\n if h[i]>h[i+1]:\n h_.append(h[i]-1)\n else:\n h_.append(h[i])\nh_.append(h[n-...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s245080153', 's463756781', 's496669865', 's569709818', 's634910638', 's675149315', 's760140965', 's921026837', 's939695354', 's832990896']
[14252.0, 2940.0, 2940.0, 2940.0, 2940.0, 14396.0, 2940.0, 14224.0, 2940.0, 14252.0]
[65.0, 17.0, 17.0, 17.0, 18.0, 63.0, 17.0, 63.0, 17.0, 91.0]
[131, 267, 207, 265, 249, 154, 247, 150, 204, 170]
p02953
u172010803
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n=int(input())\nh=list(map(int,input().split(" ")))\nm=0\na=False\nfor i in h:\n if i<m+1:\n a=True\n if i>m:\n m=i\nprint(\'YNeos\'[a::2])', 'n=int(input())\nh=list(map(int,input().split(" ")))\nm=h[0]\na=False\nfor i in h:\n if i+1<m:\n a=True\n if i>m:\n m=i\nprint(\'YNeos\'...
['Wrong Answer', 'Accepted']
['s572300618', 's499858981']
[14396.0, 14252.0]
[58.0, 58.0]
[148, 152]
p02953
u174394352
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nH = list(map(int,input().split()))\n\nfor i in range(1,N):\n ind = N - i - 1\n print(ind)\n if H[ind+1] == H[ind] - 1:\n H[ind] -= 1\n elif H[ind+1] < H[ind] - 1:\n print("No")\n exit()\nprint("Yes")\n', 'N = int(input())\nH = list(map(int,input().split()))\n\nfor i ...
['Wrong Answer', 'Accepted']
['s881525143', 's192482216']
[14396.0, 14396.0]
[162.0, 88.0]
[240, 225]
p02953
u175426149
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nhs = list(map(int, input().split()))\n\nif n == 1:\n print("Yes")\n exit()\n\nfor i in range(n-1):\n if hs[i-1] >= hs[i]:\n hs[i-1] -= 1\n\nflag = True\nfor i in range(1,n):\n if hs[i-1] > hs[i]:\n flag = False\nif flag:\n print("Yes")\nelse:\n print("No")\n', 'n = in...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s003160117', 's112308551', 's332474095', 's391076372', 's152268689']
[14396.0, 14224.0, 14252.0, 14396.0, 14252.0]
[91.0, 90.0, 72.0, 92.0, 79.0]
[289, 298, 230, 287, 245]
p02953
u176674210
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["# -*- coding:utf8 -*-\n\nn = int(input())\nh = list(map(int, input().split()))\nans = 'Yes'\np, pp = 0, 0\nfor i in h:\n if p == 0:\n p = i\n d = p - i\n if d < -1 or (d == -1 and pp == -1):\n ans 'No'\n break\n else:\n pp = p\n p = d\nprint(ans)", "# -*- coding:utf8 -...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s139633402', 's186543110', 's282936650', 's374743896', 's538617983', 's872544558', 's920325711', 's694482274']
[2940.0, 14228.0, 14396.0, 14224.0, 2940.0, 14228.0, 14396.0, 14396.0]
[17.0, 43.0, 77.0, 62.0, 17.0, 55.0, 58.0, 113.0]
[279, 296, 280, 211, 253, 198, 207, 280]
p02953
u181195295
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nli = list(map(int,input().split()))\n\nfor i in range(N-1):\n if li[i+1] >= li[i]+2:\n print("No")\n sys.exit()\n \n elif li[i+1] == li[i]+1:\n li[i+1] = li[i]\n \n else: continue\n \nprint("Yes")', 'import sys\n\nN = int(input())\nli = list(map(int,input().split()))\nli.reverse...
['Runtime Error', 'Accepted']
['s854563252', 's330565915']
[14396.0, 14396.0]
[83.0, 85.0]
[222, 247]
p02953
u185405877
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n=int(input())\ni= list(map(int, input().split()))\nflag=0\nif n==1:\n pass\nelse:\n for j in range(n-1):\n if i[j+1]>=i[j]:\n pass\n elif i[j]-1==i[j+1]:\n if flag==0:\n flag=2\n elif flag==2:\n flag=1\n break\nif flag==0:\...
['Wrong Answer', 'Accepted']
['s797494898', 's580822020']
[14396.0, 15020.0]
[70.0, 77.0]
[354, 243]
p02953
u185767120
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n=int(input())\nlist=list(map(int,input().split()))\nfor i in range(1,n-2):\n if (list[i-1]+list[i+1])//2<=list[i]<=(list[i-1]+list[i+1])//2+1:\n continue\n else:\n print("No")\n break\nelse:\n if list[n-1]>=list[n-2]:\n print("yes")\n else:\n print("No")', 'n=int(input(...
['Wrong Answer', 'Accepted']
['s702942717', 's010737719']
[14396.0, 14252.0]
[113.0, 75.0]
[290, 181]
p02953
u186478631
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nh = list(map(int,input().split()))\n\nfor i in range(len(h)-1):\n if h[i] >= h[i+1]:\n h[i] = h[i] - 1\nif h == sorted(h):\n print('Yes')\nelse:\n print('No')", "n = int(input())\nh = list(map(int, input().split()))\n\nfor i in reversed(range(1,n)):\n if h[i-1] - h[i] == 1:\n h[i-1] -= 1\n...
['Wrong Answer', 'Accepted']
['s723206911', 's625621039']
[14224.0, 14396.0]
[104.0, 79.0]
[173, 191]
p02953
u188622592
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\ni = list(map(int, input().split()))\n\nf = 1\nfor k in range(1, n):\n if f == 0:\n continue\n \n if k == 0:\n continue\n \n if i[k-1] < i[k]:\n i[k] = i[k] - 1\n elif i[k-1] - 1 == i[k]:\n i[k] = i[k]\n else:\n f = 0\n \nif f == 0:\n print('No')\nelse:\n print('Yes')", "...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s460741737', 's598873319', 's853431821']
[14228.0, 3064.0, 14224.0]
[83.0, 17.0, 90.0]
[293, 319, 289]
p02953
u188827677
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nh = list(map(int, input().split()))\n\nlast = h[-1]\np = 'Yes'\nt = h[0]\nfor i in h:\n if i > last + 1 or t > i:\n p = 'No'\n t = i\nprint(p)\n", 'n = int(input())\nh = list(map(int, input().split()))[::-1]\n\nfor i in range(1,n):\n if h[i] - h[i-1] > 1:\n print("No")\n exit()\n elif h...
['Wrong Answer', 'Accepted']
['s657978051', 's197846174']
[14252.0, 14276.0]
[61.0, 80.0]
[156, 185]
p02953
u192154323
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nh_ls = list(map(int, input().split()))\n\ntarget = [0]\nfor i in range(1,n):\n d = h_ls[i] - h_ls[i-1]\n if d > 0:\n target = []\n if d == 0:\n target.append(i)\n if d < 0:\n for j in target:\n h_ls[j] -= 1\nres = 'Yes'\nfor i in range(1,n):\n d = h_ls[...
['Wrong Answer', 'Accepted']
['s525815153', 's427567663']
[14396.0, 15020.0]
[110.0, 135.0]
[361, 408]
p02953
u192908410
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['a=int(input())\nh=list(map(int,input().split()))\nm=0\nr=True\nfor i in h:\n m=max(m,i)\n if m!=i:\n r=i+1=<m\nprint("NYoe s"[r::2])\n', 'a=int(input())\nh=list(map(int,input().split()))\nm=0\nr=True\nfor i in h:\n m=max(m,i)\n if m!=i:\n r=i+1==m\nprint(r)', 'input()\nh=list(map(int,input().split()))\nm=0...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s139358423', 's496682753', 's527245405']
[2940.0, 14396.0, 14396.0]
[17.0, 80.0, 75.0]
[130, 117, 132]
p02953
u193598069
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N = int(input())\nH = list(map(int, input().split()))\nans = 'Yes'\n\nH[0] -= 1\nfor i in range(N-1):\n if H[i] < H[i+1]\n H[i+1] -= 1\n elif H[i] > H[i+1]\n ans = 'No'\n break\n\nprint(ans)\n", "N = int(input())\nH = list(map(int, input().split()))\nans = 'Yes'\n\nH[0] -= 1\nfor i in range...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s099828178', 's574941168', 's578974100', 's974369565', 's196227552']
[2940.0, 14396.0, 14396.0, 14396.0, 14396.0]
[17.0, 73.0, 58.0, 57.0, 72.0]
[206, 224, 214, 262, 208]
p02953
u193927973
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N=int(input())\nA=list(map(int, input().split()))\ntmpmax=A[0]\nikeru=True\nok=True\nfor i in range(1,N):\n if tmpmax>A[i]:\n if tmpmax-1==A[i] and ok:\n tmpmax-=1\n ok=False\n else:\n ikeru=False\n break\n elif tmpmax==A[i] and ok==False:\n ikeru=False\n break\n else:\n ok=True\...
['Wrong Answer', 'Accepted']
['s384836977', 's552848703']
[14396.0, 14396.0]
[77.0, 72.0]
[362, 314]
p02953
u200527996
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nH = list(map(int, input().split()))\nans = 1\nfor i in range(N):\n if H[i] == H[i+1] or (H[i+1]-1):\n ans *= 1\n else:\n ans *= 0\nprint("Yes" if ans == 1 else "No")', 'N = int(input())\nH = list(map(int, input().split()))\nans = 1\nfor i,j,k in zip(H,H[1::],H[2::]):\n if i ==...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s057175053', 's184583737', 's260377884', 's269967529', 's345126390', 's410114565', 's544217607', 's550275408', 's607029569', 's738506419', 's687444962']
[14252.0, 2940.0, 2940.0, 14252.0, 14252.0, 14228.0, 15020.0, 2940.0, 14224.0, 14396.0, 15020.0]
[74.0, 17.0, 18.0, 52.0, 145.0, 65.0, 143.0, 18.0, 43.0, 53.0, 71.0]
[195, 252, 220, 180, 275, 192, 215, 198, 195, 188, 203]
p02953
u203211107
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['\nN=int(input())\nH=list(map(int, input().split()))\nt=True\nfor i in range(1,N+1):\n M=max(H[:i])\n if M>min(H[i:])+1:\n print("No")\n t=False\n break\nif t:\n print("Yes")', '\nN=int(input())\nH=list(map(int, input().split()))\nt=True\nfor i in range(1,N+1):\n M=max(H[:i])\n if M...
['Runtime Error', 'Runtime Error', 'Accepted']
['s055137346', 's326914732', 's085966681']
[14396.0, 14224.0, 14252.0]
[2104.0, 2104.0, 66.0]
[209, 209, 221]
p02953
u203383537
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N=int(input())\nH=list(map(int,input().split()))\n\nfor i in range(N-1):\n\ts=H[i:i+2]\n\tif s[0]-s[1] >0 and s[0]-s[1] ==1:\n\t s[0] -=1\n\tH[i]=s[0] \nprint(H)\n\nmax=H[0]\nans=False\n\nfor i in H:\n if i >= max:\n max=i\n ans=True\n else:\n ans=False\n \nif ans:\n print('...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s260177887', 's838117315', 's850302727']
[14252.0, 14396.0, 14396.0]
[112.0, 87.0, 77.0]
[328, 173, 264]
p02953
u210827208
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n=int(input())\nH=list(map(int,input().split()))\nans='Yes'\nfor i in range(1,n-1):\n if H[i]<H[i-1] or H[i]-1>H[i+1]:\n ans='No'\n break\n \nprint(ans)", "n=int(input())\nH=list(map(int,input().split()))\nans='Yes'\nma=0\nfor i in range(1,n):\n if ma-1>H[i]:\n ans='No'\n break\n ...
['Wrong Answer', 'Accepted']
['s569661518', 's779031644']
[15020.0, 14396.0]
[80.0, 82.0]
[164, 163]
p02953
u212328220
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nhl = list(map(int,input().split()))\n\nfor i in range(1,n):\n if hl[i] - hl[i-1] > 1:\n print('No')\n exit()\nprint('Yes')\n", "n = int(input())\nhl = list(map(int,input().split()))\n\nmax_num = 0\nfor i in range(n):\n if hl[i] + 1 < max_num:\n print('No')\n exit()\...
['Wrong Answer', 'Accepted']
['s506501117', 's364534331']
[20648.0, 20496.0]
[62.0, 85.0]
[151, 194]
p02953
u214561383
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nh = list(map(int, input().split()))\nif n==1:\n print('Yes')\n exit()\nfor i in range(n-1):\n if n[n-i] = n[n-i-1]-1:\n n[n-i-1] -= 1\n elif n[n-i] < n[n-i-1]-1:\n print('No')\n exit()\nprint('Yes')", "n = int(input())\nh = list(map(int, input().split()))\nif n==1:\n...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s087613214', 's164093206', 's344494240', 's409448316', 's920454070', 's942882844', 's482749199']
[2940.0, 2940.0, 14396.0, 14396.0, 15020.0, 2940.0, 14396.0]
[17.0, 17.0, 42.0, 43.0, 42.0, 17.0, 73.0]
[238, 238, 243, 271, 245, 242, 252]
p02953
u215286521
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nnums = [int(i) for i in input().split()]\n\nbool = True\nfor i in range(0, len(nums), 1):\n t = nums[i] - 1\n if t > nums[i+1]:\n bool = False\n\nif bool:\n print("Yes")\nelse:\n print("No")\n', 'n = int(input())\nnums = [int(input()) for _ in range(n)]\n\nbool = True\nfor i in ra...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s026186946', 's157224755', 's317493928', 's711645080', 's122915715']
[14396.0, 5976.0, 14252.0, 14252.0, 15020.0]
[66.0, 24.0, 80.0, 67.0, 89.0]
[216, 200, 247, 201, 213]
p02953
u217121806
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n=int(input())\nh = list(map(int,input().split()))\n\n\n\nfor i in range(n):\n\n if(i==0):\n pass\n elif( int(h[-(i+1)]) >= 1 + int(h[-i]) ):\n answer = "No"\n break\n elif(int(h[-(i+1)]) == 1 + int(h[-i])):\n tem = 1\n else:\n tem = 0\n\n answer = "Yes"\n\n\nprint(an...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s461724298', 's989402095', 's434704676']
[14396.0, 3064.0, 14396.0]
[144.0, 17.0, 152.0]
[303, 310, 322]
p02953
u217627525
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n=int(input())\nh=list(map(int,input().split()))\nans="Yes"\nhmax=h[0]\nfor i in range(1,n):\n if a[i]<hmax-1:\n ans="No"\n break\n else:\n hmax=max(hmax,a[i])\nprint(ans)', 'n=int(input())\nh=list(map(int,input().split()))\nans="Yes"\nhmax=h[0]\nfor i in range(1,n):\n if h[i]<hmax-1:\n ...
['Runtime Error', 'Accepted']
['s172680034', 's858687694']
[14244.0, 14252.0]
[42.0, 81.0]
[188, 188]
p02953
u218838821
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nH = list(map(int,input().split()))\n\nfor i in range(N-1):\n next = H[i+1]\n if H[i] - next > -1:\n print("No")\n exit()\n if H[i] - next == -1:\n H[i] -= 1\n\nfor i in range(N-1):\n if H[i] > H[i+1]:\n print("No")\n exit()\n \nprint("Yes")', 'N ...
['Wrong Answer', 'Accepted']
['s897944637', 's951485589']
[20700.0, 20596.0]
[81.0, 74.0]
[296, 198]
p02953
u222801992
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n=int(input())\nH=list(map(int,input().split()))\nI=[0]*n\nans=True\nfor i in range(n-1):\n I[i+1]=max(I[i],H[i])\nfor j in range(n):\n if H[j]<I[j]+1:\n ans=False\n print("No")\n break\nif ans:\n print("Yes")', 'n=int(input())\nH=list(map(int,input().split()))\nans=True\nfor i in range(...
['Wrong Answer', 'Accepted']
['s460659271', 's561192825']
[14224.0, 14224.0]
[95.0, 83.0]
[227, 224]
p02953
u224554402
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nheight_lists=list(map(int, input().split()))\nfor i in range(1,n):\n #print(i)\n #print(height_lists)\n #print()\n if height_lists[i-1] <= height_lists[i]:\n pass\n elif height_lists[i-1] < height_lists[i]:\n height_lists[i] -=1\ncp_list = height_lists.copy()\ncp_list.so...
['Wrong Answer', 'Accepted']
['s036159872', 's422831890']
[20608.0, 20660.0]
[82.0, 86.0]
[416, 379]
p02953
u225020286
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N=int(input())\nH=list(map(int,input().split()))\nif len(H)==1:\n print("Yes")\n exit()\nfor i in range(1,N):\n if H[i-1]>H[i]-1:\n print("No")\n exit()\nelse:\n print("Yes")', 'N=int(input())\nH=list(map(int,input().split()))\nif len(H)==1:\n print("Yes")\n exit()\nfor i in range(1,N):\n if H[i-1]<H[i]-...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s069224652', 's831063208', 's304177722']
[14396.0, 14252.0, 14396.0]
[61.0, 64.0, 78.0]
[174, 174, 207]
p02953
u225388820
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N = int(input())\nA=list(map(int,input().split()))\ni=N-2\nj=0\nask=0\nwhile(j<N):\n while(N-3-j<i):\n x=A[i+1]-A[i]\n if x<-1:\n ask=1\n break\n elif x==-1:\n A[i]=A[i]-1\n break\n i=i-1\n j=j+1\n i=N-2-j\nif ask==0:\n print('Yes')\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s128754847', 's947859019', 's443866974']
[14396.0, 14276.0, 14396.0]
[123.0, 2104.0, 85.0]
[321, 318, 199]
p02953
u226191225
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["b=int(input())\na = [int(i) for i in input().split()]\na.insert(0,0)\nfor i in range(b):\n if a[i] < a[i+1]:\n a[i+1] -=1\nprint(a)\nfor i in range(b):\n if a[i] > a[i+1]:\n print('No')\n exit()\nprint('Yes')", "b=int(input())\na = [int(i) for i in input().split()]\na.insert(0,0)\nfor i in range(b):\n if ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s007807207', 's267304753', 's558900398', 's930315172', 's030087620']
[14396.0, 14252.0, 14396.0, 14252.0, 14396.0]
[107.0, 99.0, 78.0, 86.0, 88.0]
[208, 207, 206, 198, 225]
p02953
u226912938
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N = int(input())\nH = list(map(int, input().split()))\n\nans = 0\n\nfor i in reversed(range(0, N-1)):\n if H[i] > h[i+1] + 1:\n ans += 1\n elif H[i] == h[i+1] + 1:\n h[i] -= 1\n\nif ans == 0:\n print('Yes')\nelse:\n print('No')", "N = int(input())\nH = list(map(int, input().split()))\n\nans ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s449382075', 's904398283', 's742431977']
[14396.0, 14396.0, 14396.0]
[43.0, 85.0, 86.0]
[239, 243, 204]
p02953
u227085629
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nhoge_list = list(map(int,input().split()))\nh_list = hoge_list[::-1]\nmae = h_list[-1]\ns = 0\nfor h in h_list:\n if h <= mae:\n mae = h\n elif h-1 = mae:\n mae = h-1\n else:\n print('No')\n s += 1\n break\nif s == 0:\n print('Yes')", "n = int(input())\nhoge_list = list(map(int,in...
['Runtime Error', 'Accepted']
['s647631166', 's098440470']
[2940.0, 14396.0]
[17.0, 56.0]
[254, 254]
p02953
u228232845
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["\n\n\n\n\ndef main():\n n = int(input())\n h = list(map(int, input().split()))\n\n ans = 'Yes'\n \n for i in reversed(range(1,n)):\n if h[i-1] <= h[i]: continue\n if h[i-1] == h[i]-1:\n h[i] = h[i] -1\n continue\n ans = 'No'\n break\n print(ans)\n \ni...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s553526893', 's853973575', 's458715007']
[14224.0, 14396.0, 14252.0]
[50.0, 51.0, 63.0]
[452, 415, 457]
p02953
u230621983
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nh = list(map(int, input().split()))\ntmp = h[-1]\nans = 'Yes'\n\nfor i in range(2,n+1):\n print(tmp, h[-i],i)\n if tmp - h[-i] == -1:\n tmp = h[-i]-1\n elif tmp - h[-i] < -1:\n ans = 'No'\n break\n else:\n tmp = h[-i]\n\nprint(ans)", "n = int(input())\nh = lis...
['Wrong Answer', 'Accepted']
['s845353674', 's697831284']
[14252.0, 14396.0]
[257.0, 78.0]
[274, 250]
p02953
u231261695
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nh = list(map(int, input().split()))\n\nfor i in range(n-1):\n if h[i] >= h[i+1]:\n h[i] -= 1\nfor i in range(n-1):\n if h[i] < h[i+1]:\n print("No")\n exit()\nprint("Yes")', 'n = int(input())\nh = list(map(int, input().split()))\nfor i in range(1, n):\n if h[i-1] < h[i]...
['Wrong Answer', 'Accepted']
['s935263637', 's433571720']
[15020.0, 14396.0]
[88.0, 81.0]
[206, 206]
p02953
u235376569
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['import sys\nN=int(input())\n\nH=[int(x) for x in input().rstrip().split()]\nflag=0\nmi=-1\nfor i in range(N-1):\n mi=max(H[i],mi)\n if H[i]<=H[i+1] and mi<=H[i]:\n\n continue\n elif H[i+1]<H[i]:\n H[i]=H[i]-1\n\n if H[i+1]<H[i] or H[i]<mi:\n flag=1\n print("No")\n sys.exit()\n\nif flag==0:\...
['Wrong Answer', 'Accepted']
['s740898138', 's573550756']
[14252.0, 14704.0]
[96.0, 115.0]
[321, 330]
p02953
u239528020
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['#!/usr/bin/env python3\n\nn = int(input())\nh = list(map(int, input().split()))\n\nh.reverse()\n\n\nans = 0\nfor i in range(1, len(h)):\n if h[i-1]-h[i] >= 0:\n continue\n elif h[i-1]-h[i] == 0:\n h[i] -= 1\n else:\n print("No")\n exit()\n\nprint("Yes")\n', '#!/usr/bin/env python3...
['Wrong Answer', 'Accepted']
['s746615139', 's296033173']
[14252.0, 14228.0]
[57.0, 69.0]
[273, 274]
p02953
u243312682
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["def main():\n n = int(input())\n h = list(map(int, input().split()))\n\n pre = 0\n flag = True\n for i in range(n):\n if h[i] >= pre + 1:\n h[i] -= -1\n if h[i] < pre:\n flag = False\n break\n pre = h[i]\n \n if flag:\n print('Yes')\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s002003149', 's219075214', 's489187607', 's920095711', 's721089908']
[14252.0, 14224.0, 15020.0, 15020.0, 20560.0]
[60.0, 63.0, 68.0, 106.0, 77.0]
[385, 321, 362, 320, 385]
p02953
u243699903
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n=int(input())\nh_list=[int(s) for s in input().split()]\n\nif n==1:\n print('Yes')\n exit()\n\nleft=h_list[0]\nfor i in range(1,n):\n right=h_list[i]\n\n if left+1<right:\n left=right-1\n if left==right:\n continue\n print('No')\n exit()\n\n\nprint('Yes')", "n=int(input())\nh_list=...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s368248400', 's671621058', 's249210739']
[14252.0, 14252.0, 14396.0]
[64.0, 63.0, 63.0]
[272, 270, 287]
p02953
u244416763
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\na = list(map(int, input().split()))\ni = n-1\nwhile (i > 1):\n if (a[i-1] > a[i]):\n a[i-1] -= 1\n i -= 1\n\nj = 0\nc = 0\n\nwhile (j < n-1):\n if (a[j] > a[j+1]):\n c += 1\n j += 1\nif (c == 0):\n print('Yes')\nelse:\n print('No')\nprint (a,c)", "n = int(input())\na ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s840711936', 's876849544', 's421915681']
[14252.0, 14252.0, 14396.0]
[127.0, 127.0, 123.0]
[275, 273, 263]
p02953
u248670337
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nH = list(map(int, input().split()))\nans = True\nif N != 1:\n for i in range(N - 1):\n if i == N - 2:\n if (H[i] - 1) <= H[i + 1]:\n continue\n else:\n ans = False\n elif (H[i] - 1) <= H[i + 1] and (H[i]) <= H[i + 2]:\n ...
['Wrong Answer', 'Accepted']
['s734212940', 's340199656']
[14396.0, 14704.0]
[84.0, 110.0]
[418, 451]
p02953
u249218227
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nli = list(map(int, input().split()))\nans = "Yes"\ncount = N - 1\nwhile count >= 0:\n if li[count] - li[count-1] >= 0:\n pass\n elif li[count] - li[count-1] == -1:\n li[count-1] -= 1\n else:\n ans = "No"\n break\n count -= 1\nprint(ans)', 'N = int(input())\nli...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s115158820', 's140317662', 's366295241', 's486548710', 's750623342']
[14396.0, 2940.0, 2940.0, 14396.0, 14396.0]
[78.0, 17.0, 17.0, 2104.0, 78.0]
[281, 281, 280, 653, 281]
p02953
u252828980
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nL = list(map(int,input().split()))[::-1]\n\nflag = True\nfor i in range(n-1):\n if L[i]-1 <= L[i+1]:\n continue\n else:\n flag = False\nif flag:\n print("Yes")\nelse:\n print("No")', ' n=int(input())\n li=list(map(int,input().split()))\n max1 = li[0]\n ans = ""\...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s426042051', 's520516529', 's781145188', 's355735341']
[14396.0, 2940.0, 14252.0, 14396.0]
[64.0, 17.0, 61.0, 84.0]
[212, 466, 240, 379]
p02953
u255499778
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nh = list(map(int, input().split()))\n \nif n == 1:\n print("Yes")\nelse:\n for i in range(n-1):\n if h[i+1] <= h[i]:\n h[i] -= 1\n for i in range(n-1):\n if h[i+1] < h[i]:\n print("No")\n break \n ...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s392340306', 's543916051', 's803287050', 's874262863', 's941167728', 's534691273']
[14252.0, 14252.0, 14224.0, 2940.0, 2940.0, 14396.0]
[82.0, 77.0, 83.0, 17.0, 17.0, 98.0]
[334, 335, 244, 241, 277, 366]
p02953
u258808501
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['\ndef hoge(lst,i):\n if lst[i]==lst[i+1]:\n hoge(lst,i+1)\n if lst[i]>lst[i+1]:return True\n if lst[i]<lst[i+1]:return False\n\nN = int(input())\nH = list(map(int,input().split()))\ndet=0\n\nfor i in range(N-1):\n if H[i]-1>H[i+1]:\n det+=1\n print("No")\n break\n if i+2<=N-...
['Runtime Error', 'Accepted']
['s526479655', 's844577197']
[14704.0, 14704.0]
[127.0, 135.0]
[515, 557]
p02953
u261260430
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nh_list = map(int, input().split())\nh = 0\nresult = 'Yes'\nfor i in range(n):\n if h <= h_list[i]:\n h = h_list[i]\n elif h == h_list[i]-1:\n h = h_list[i]-1\n else:\n result = 'No'\nprint(result)", "n = int(input())\nh_list = list(map(int, input().split()))\nh = 0\nresult = 'Yes'\nfor i...
['Runtime Error', 'Accepted']
['s454262603', 's910058869']
[11152.0, 15020.0]
[27.0, 76.0]
[215, 222]
p02953
u266874640
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N = int(input())\nH = list(map(int,input().split()))\nif N == 1:\n print('Yes')\n exit()\nfor i in range(N-1):\n if H[i] == H[i+1]:\n pass\n elif H[i] < H[i+1]:\n H[i+1] -= 1\n else:\n print('No')\n exit()\ninput('Yes')\n", "N = int(input())\nH = list(map(int, input().split(...
['Runtime Error', 'Accepted']
['s095286008', 's046746827']
[14252.0, 14252.0]
[86.0, 91.0]
[250, 255]
p02953
u268792407
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n=int(input())\nh=list(map(int,input().split()))\nfor i in range(n-1):\n if h[n-2-i]-1>h[n-1-i]:\n print('No')\n exit()\n elif h[n-2-i]-1=h[n-1-i]:\n h[n-2-i]=h[n-2-i]-1\nprint('Yes')", "n=int(input())\nh=list(map(int,input().split()))\nfor i in range(n-1):\n if h[n-2-i]-1>h[n-1-i]:\n print('No...
['Runtime Error', 'Accepted']
['s778861563', 's311327632']
[2940.0, 14524.0]
[17.0, 109.0]
[192, 193]
p02953
u273006189
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nH = list(map(int, input().split()))\n\nH.append(H[-1])\n\nfor n in range(N):\n if (H[n+1] - H[n]) > 1:\n H[n+1] -= 1\n if (H[n+1] - H[n]) < 0:\n print("No")\n exit(0)\n \nprint("Yes")', 'N = int(input())\nH = list(map(int, input().split()))\n\nH.append(H[-1])\nH.append(...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s677824684', 's788257902', 's826816627', 's872921575', 's191655869']
[14396.0, 14400.0, 14116.0, 14396.0, 14396.0]
[88.0, 164.0, 87.0, 98.0, 87.0]
[219, 375, 235, 262, 267]
p02953
u273928723
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['a=input()\na=int(a)\nb=[int(i) for i in input().split()]\nx=0\nc=0\nborder=0\nfor i in b:\n if x<=i-1 and border<=i:\n border=max(x,i-1)\n x=i\n continue\n c=1\n print("No")\n break\nif c==0:\n print("Yes")\n', 'a=input()\na=int(a)\nb=[int(i) for i in input().split()]\nx=0\nc=0\nof...
['Wrong Answer', 'Accepted']
['s513217783', 's256420510']
[14396.0, 14704.0]
[83.0, 83.0]
[228, 280]
p02953
u274635633
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n=int(input())\nh=list(map(int,input().split()))\nans='Yes'\na[0]-=1\nfor i in range(n-1):\n if a[i]>a[i+1]:\n ans='No'\n elif a[i+1]>a[i]:\n a[i+1]-=1\nprint(ans)", "n=int(input())\na=list(map(int,input().split()))\nans='Yes'\na[0]-=1\nfor i in range(n-1):\n if a[i]>a[i+1]:\n ans='No'\n elif a[i+1]>a[i]...
['Runtime Error', 'Accepted']
['s716020851', 's146665570']
[14396.0, 14396.0]
[43.0, 89.0]
[162, 162]
p02953
u276204978
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N = int(input())\nH = map(int, input().split())\n\nf = True\n\nfor i in range(N - 1):\n if H[i] - H[i + 1] > 1:\n f = False\n break\n \nif f:\n print('Yes')\nelse:\n print('No')\n ", "N = int(input())\nH = map(int, input().split())\n \nf = True\n \nfor i in range(N - 1):\n if H[i + 1] - H[i] > 1:\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s471860245', 's646363811', 's169153326']
[11152.0, 11152.0, 14252.0]
[27.0, 27.0, 62.0]
[181, 178, 223]
p02953
u280552586
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nH = list(map(int, input().split()))\ncnt = 0\n\nfor i in range(n-1):\n if H[i]-1 < H[i+1]:\n cnt += 1\n\nprint('Yes' if cnt == n-1 else 'No')\n", "n = int(input())\nH = list(map(int, input().split()))\ncnt = 0\n\nfor i in reversed(range(0, n-1)):\n if H[i] > H[i+1]:\n H[i] -= 1\n...
['Wrong Answer', 'Accepted']
['s232558520', 's083034893']
[15020.0, 14224.0]
[71.0, 66.0]
[162, 219]
p02953
u281745878
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nH_list = list(map(int,input().split()))\nFlag = False\nif N == 1:\n\n print("Yes")\n \nelse:\n for i in range(N):\n if H_list[N-1-i-1] - H_list[N-1-i] > 1:\n print("No")\n break\n elif H_list[N-1-i-1] - H_list[N-1-i] = 1:\n H_list[N-1-i-1] = H_...
['Runtime Error', 'Accepted']
['s524113707', 's795684057']
[2940.0, 14252.0]
[17.0, 109.0]
[390, 392]
p02953
u282228874
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["s = input()+'R'\ndp = [0] * (len(s))\nrr = 0\nll = 0\nfor i in range(len(s) - 2):\n if (s[i] == 'R'): rr += 1\n else: ll += 1\n if (s[i] == 'R' and s[i + 1] == 'L'):\n l = i\n r = i+1\n if (s[i] == 'L' and s[i + 1] == 'R'):\n dp[l] = (ll+rr) // 2\n dp[r] = (ll + rr) // 2\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s614298843', 's987040792', 's897809239']
[3064.0, 3064.0, 14396.0]
[17.0, 17.0, 84.0]
[626, 630, 222]
p02953
u282657760
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N = int(input())\nH = list(map(int, input().split()))\nans = 'Yes'\nif N == 1:\n print(ans)\nelse:\n for i in range(N):\n if i == 0:\n if H[0]-1 > H[1]:\n ans = 'NO'\n break\n elif H[0] > H[1]:\n H[0] -= 1\n else:\n if H[i] <= H[i+1]:\n continue\n elif H[i]-1 > ...
['Runtime Error', 'Accepted']
['s780693169', 's779241065']
[14396.0, 14704.0]
[91.0, 101.0]
[479, 550]
p02953
u286422818
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['if __name__ == "__main__":\n n = int(input())\n h = list(map(int, input().split(" ")))\n\n ans = "Yes"\n for i in range(2,len(h)):\n if not (h[i-2] <= h[i-1] and h[i-1] <= h[i]):\n if not (h[i-2] <= h[i-1]-1 and h[i-1]-1 <= h[i]):\n ans = "No"\n\n if len(h) == 2:\n ...
['Wrong Answer', 'Accepted']
['s222318134', 's730304161']
[14252.0, 15020.0]
[91.0, 79.0]
[407, 306]
p02953
u293403071
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nhlist = []\nfor i in range(n):\n hlist.append(map(int,input().split()))\n\nresult = True\nfor j in range(n-1):\n if hlist[j] <= hlist[j+1]:\n \n else if hlist[j]+1 == hlist[j+1]:\n \n else:\n result = False\n \nif result:\n print('Yes')\nelse:\n print('No')", "n = int(input())\nhli...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s112171604', 's522860935', 's329961660']
[2940.0, 14396.0, 14396.0]
[17.0, 80.0, 74.0]
[276, 249, 257]
p02953
u294385082
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nh = list(map(int,input().split()))\n\nfor i in range(n-1):\n if h[i] == h[i+1]+1:\n j = i\n p = 1\n break\n elif h[i] >= h[i+1] + 2:\n p = 2\n break\n else:\n j = 0\n p = 3\n\nif j == 0:\n print("Yes")\nelse: \n if min(h[j:]) + 2 <= h[j] or p == 2:\n print("No")\n else:\...
['Runtime Error', 'Accepted']
['s461222797', 's033382317']
[3060.0, 14400.0]
[17.0, 105.0]
[312, 331]
p02953
u294520705
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nHList = list(map(int, input().split()))\nlast = 0\nans = True\nfor i in range(N):\n \n if last < HList[i]:\n HList[i] = HList[i] - 1\n \n if last > HList[i]:\n ans = False\n break\n last = HList[i]\nprint(HList)\nprint("Yes" if ans else "No")\n', 'N = int(input())...
['Wrong Answer', 'Accepted']
['s582810559', 's785905230']
[14396.0, 14252.0]
[91.0, 83.0]
[394, 381]
p02953
u294897522
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nh = map(int, input().split())\nans = True\nminv = 0\n\nfor i in range(len(h)-1):\n down = False\n \n if h[i] > h[i+1]:\n if h[i] - h[i+1] > 1:\n ans = False\n break\n else:\n if h[i]-1 >= minv:\n h[i] -= 1\n minv =...
['Runtime Error', 'Accepted']
['s362053482', 's408940485']
[11744.0, 14396.0]
[27.0, 99.0]
[526, 533]
p02953
u300109915
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nl = list(map(int, input().split()))\ns = 0\nd = 0\nfor i in range(N-1):\n if l[i] - l[i+1] <= 1:\n s += 1\nfor i in range(N-2):\n if l[i] - l[i+2] <= 1:\n d += 1\nif s == N-1 and d == N-2 or N ==1:\n print("YES")\nelse:\n print("NO")', 'N = int(input())\nl = list(map(int, input().split()))...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s099765304', 's571499862', 's829877920', 's339821160']
[14252.0, 14252.0, 2940.0, 14396.0]
[94.0, 94.0, 17.0, 130.0]
[248, 250, 276, 386]
p02953
u300579805
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["import sys\n\nN = int(input())\nH = list(map(int, input().split()))\n\nfor i in range(N-1):\n if (H[i] > H[i+1]):\n H[i] -= 1\n \n\nfor j in range(N-1):\n if (H[j] > H[i+1]):\n print('No')\n elif(j==N-1):\n print('Yes')", "N = int(input())\nH = list(map(int, input().split()))\n \nfor ...
['Wrong Answer', 'Accepted']
['s411990493', 's446272812']
[14396.0, 14396.0]
[132.0, 87.0]
[238, 193]
p02953
u301984327
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['num = int(input())\n\nh = [int(x) for x in input().split()]\n\nbefor = 0\n\nf = True\n\nfor i in range(num):\n if h[i] > befor:\n befor = h[i] - 1\n elif h[i] < befor:\n f = False:\n break\n \nif f:\n print("Yes")\nelse:\n print("No")', 'num = int(input())\n\nh = [int(x) for x in input().split()]\n...
['Runtime Error', 'Accepted']
['s951569872', 's585694048']
[2940.0, 14396.0]
[17.0, 65.0]
[235, 232]
p02953
u303059352
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n=int(input())\na=list(map(int,input().split()))\nmx=0\nfor i in a:\n mx=max(mx, i)\n if mx-i>1:\n print('No')\n return 0\nprint('Yes')\n", "n=int(input())\na=list(map(int,input().split()))\nmx=0\nfor i in a:\n mx=max(mx, i)\n if mx-i>1:\n print('No')\n return\nprint('Yes')", "n=int(input())\na=list(m...
['Runtime Error', 'Runtime Error', 'Accepted']
['s095691508', 's273699538', 's216246757']
[2940.0, 2940.0, 14252.0]
[18.0, 17.0, 70.0]
[136, 133, 134]
p02953
u304292701
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nh = list(map(int,input().split()))\n\nfalg = 0\n\nfor i in range(len(h) - 1):\n if h[i] < h[i+1]:\n h[i+1] -= 1\n elif h[i] > h[i+1]:\n flag = 1\n break\n \nprint("Yes" if flag == 0 else "No")\n', 'n = int(input())\nh = list(map(int,input().split()))\nmax_h = h[...
['Runtime Error', 'Runtime Error', 'Accepted']
['s658700079', 's969151254', 's531480959']
[14396.0, 14396.0, 14396.0]
[73.0, 66.0, 72.0]
[237, 235, 213]
p02953
u304593245
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['\ndef solve():\n ans = "Yes"\n for i in range(N-1):\n if H[i] - H[i+1] == 1:\n H[i] -= 1\n elif H[i] - H[i+1] > 1:\n continue\n else:\n ans = "No"\n break\n print(ans)\n\nif __name__ == "__main__":\n N = int(input())\n H = list(map(int, i...
['Wrong Answer', 'Accepted']
['s266457996', 's234186557']
[20600.0, 20584.0]
[73.0, 74.0]
[334, 434]
p02953
u305366205
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nh = list(map(int, input().split()))\nfor i in range(n-1):\n if h[i+1]-h[i] > 1:\n print('No')\n exit()\nprint('Yes')\n", "n = int(input())\nh = list(map(int, input().split()))\nh[0] -= 1\nfor i in range(1, n):\n if h[i]-h[i-1] < 0:\n print('No')\n exit()\n if h[i...
['Wrong Answer', 'Accepted']
['s373626370', 's127083681']
[15020.0, 14396.0]
[62.0, 100.0]
[146, 200]
p02953
u306070611
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nli = list(map(int,input().split()))\nli2 = []\nkey =[0] \ncnt = 0\nflg = True\nif N == 1:\n ans ="Yes"\n flg = False\nwhile flg :\n cur1 = li[cnt]\n cur2 = li[cnt+1]\n sa = cur2 - cur1\n if key[cnt] == 0:\n if sa < -1:\n ans = "No"\n flg = False\n ...
['Runtime Error', 'Accepted']
['s817375133', 's048485043']
[14400.0, 14480.0]
[117.0, 115.0]
[621, 740]
p02953
u306950978
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nh = list(map(int,input().split()))\n\nfor i in reversed(range(1,n)):\n print(i)\n if h[i-1] - h[i] == 1:\n h[i-1] -= 1\n elif h[i-1] - h[i] >=2:\n print("No")\n exit()\nprint("Yes")', 'n = int(input())\nh = list(map(int,input().split()))\n\nfor i in reversed(range(1,n))...
['Wrong Answer', 'Accepted']
['s768766095', 's241289538']
[14396.0, 15020.0]
[157.0, 81.0]
[219, 206]
p02953
u307516601
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["import sys\nsys.setrecursionlimit(10**6)\n\nn = int(input())\nh = list(map(int, input().split()))\n#n, m = map(int, input().split())\n#s = input()\n#s,t = input().split()\n#\n#readline = sys.stdin.readline\n\n#ab = [[int(i) for i in readline().split()] for _ in range(n)]\n\nfixed = [False]*n\n\nfor i in range(n-1):\n...
['Wrong Answer', 'Accepted']
['s838906707', 's201167979']
[14396.0, 14396.0]
[78.0, 87.0]
[565, 382]
p02953
u308684517
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nh = list(map(int, input().split()))\nflag = True\nfor i in range(1, n):\n if h[i-1] >= h[i]:\n h[i-1] -= 1\nfor i in range(1, n):\n if h[i-1] > h[i]:\n flag = False\n break\nif flag: print("Yes")\nelse: print("No")', 'n = int(input())\nh = list(map(int, input().split()))\n...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s063636899', 's396631354', 's485207133', 's117911933']
[14224.0, 15020.0, 14396.0, 14252.0]
[90.0, 100.0, 81.0, 102.0]
[248, 257, 251, 234]
p02953
u309039873
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N = int(input())\nH = list(map(int,input().split()))\nlower_limit = 0\nfor h in H:\n if lower_limit > h:\n print('NO')\n break\n if h - 1 > lower_limit:\n lower_limit = h - 1\nelse:\n print('YES')\n", "N = int(input())\nH = list(map(int,input().split()))\nlower_limit = 0\nfor h in H:\n ...
['Wrong Answer', 'Accepted']
['s879330224', 's781016281']
[14252.0, 15020.0]
[59.0, 63.0]
[217, 217]
p02953
u309120194
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N = int(input())\nA = list(map(int,input().split()))\n \n\n\nans = 'Yes'\nfor i in range(N-1, 0, -1):\n print(i)\n if A[i] < A[i-1]: A[i-1] -= 1\n if A[i] < A[i-1]:\n ans = 'No'\n break\n\nprint(ans)", "N = int(input())\nH = list(map(int, input().split()))\n \nans = 'Yes'\nfor i in range(1, N):\n if H[i-1] ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s061307826', 's129472910', 's212193309', 's320700430', 's450564230', 's455050345', 's677767951', 's711155734', 's183440579']
[20636.0, 20700.0, 20696.0, 20708.0, 20700.0, 20564.0, 8856.0, 20504.0, 20728.0]
[106.0, 72.0, 67.0, 74.0, 113.0, 139.0, 23.0, 135.0, 78.0]
[315, 272, 192, 303, 324, 352, 189, 364, 342]
p02953
u309141201
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["n = int(input())\nh = list(map(int, input().split()))\n# sv = h[n-1]\nok = True\nfor i in range(1, n):\n # if h[i] - sv + 1 >= 2:\n # ok = False\n if h[i] - h[i-1] < 0:\n ok = False\nif ok:\n print('Yes')\nelse:\n print('No')", "n = int(input())\nh = list(map(int, input().split()))\n# sv = h...
['Wrong Answer', 'Accepted']
['s717115660', 's369195628']
[14252.0, 14252.0]
[60.0, 80.0]
[239, 364]
p02953
u309834353
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["import sys\nimport random\nn = int(input())\nh = list(map(int,input().split()))\n\nmx = h[0]\nfor i in range(1, n):\n \n if mx > h[i]+1:\n print('NO')\n break\n mx = max(mx,h[i+1])\nprint('Yes')", "import sys\nimport random\nn = int(input())\nh = list(map(int,input()...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s252080159', 's343868119', 's373627328', 's334071826']
[15404.0, 15404.0, 15404.0, 14396.0]
[88.0, 89.0, 89.0, 84.0]
[233, 239, 233, 180]
p02953
u310233294
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N = int(input())\nH = list(map(int, input().split()))\nif N == 1:\n ans = 'Yes'\nelse:\n for i in range(N-1):\n if H[i] - 1 < H[i+1]:\n continue\n else:\n ans = 'No'\n break\n else:\n ans = 'Yes'\nprint(ans)", "N = int(input())\nH = list(map(int, input().split()))\nif H[0] > 0:\n H[0] -= 1...
['Wrong Answer', 'Accepted']
['s413170429', 's497155002']
[15020.0, 15020.0]
[62.0, 91.0]
[221, 281]
p02953
u311636831
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nH = list(map(int, input().split()))\n\ncnt=0\ncnt=H[0]\nfor i,num in enumerate(H):\n if(cnt>num):\n if(cnt>num+1):\n print("NO")\n cnt=-1\n break\n else:\n cnt=num\n\nif(cnt!=-1):\n print("YES")\n ', 'N = int(input())\nH = list(map(int, inpu...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s583499147', 's609923460', 's053724899']
[14252.0, 14224.0, 14396.0]
[61.0, 66.0, 60.0]
[258, 261, 258]
p02953
u314089899
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['#136c\nN = int(input())\nH_list = [int(e) for e in input().split()]\n\nH_list[0] -= 1 \n\nfor i in range(1,N):\n print(H_list)\n print(H_list[i-1],H_list[i])\n \n if H_list[i-1] < H_list[i]:\n H_list[i] -= 1\n \n if H_list[i-1] > H_list[i]:\n print("No")\n break\nelse:\n prin...
['Runtime Error', 'Accepted']
['s561036775', 's199963269']
[142528.0, 14252.0]
[1633.0, 87.0]
[355, 357]
p02953
u322297639
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nh = list(map(int,input().split()))\n\nans = "Yes"\nfor i in range(n-1):\n if h[i] - h[i + 1] >= 2:\n ans = "No"\n break;\n elif h[i] - h[i + 1] == 1:\n h[i] -= 1\n\nfor i in range(n-1):\n if h[i] > h[i + 1]:\n ans = "No" \n\nprint(ans))', 'def main():\n n = in...
['Runtime Error', 'Accepted']
['s097850184', 's020731714']
[3064.0, 14396.0]
[17.0, 70.0]
[276, 303]
p02953
u323045245
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nnum = list(map(int, input().split()))\nleft = num[0]\nfor i in num:\n right = i\n if 0 < abs(right-left) <= 1:\n left = max(right, left)\n elif right-left == 0:\n left += 1\n else:\n print("No")\n exit()\nprint("Yes")', 'n = int(input())\nnum = list(map(int, input().split()))\nleft =...
['Wrong Answer', 'Accepted']
['s199702016', 's070853551']
[14396.0, 14224.0]
[81.0, 61.0]
[239, 230]
p02953
u323680411
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['n = int(input())\nh = [int(x) for x in input().split()]\n\nflg = False\nans = "Yes"\nbaseline = 0\n\nfor i in range(n - 1):\n d = h[i + 1] - max(h[i], baseline)\n if d < 0:\n if d == -1 and not flg:\n flg = True\n else:\n ans = "No"\n else:\n baseline = h[i + 1]\n ...
['Wrong Answer', 'Accepted']
['s202094906', 's115309840']
[14252.0, 14396.0]
[101.0, 116.0]
[315, 243]
p02953
u325660636
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["import numpy as np\nN = int(input())\nl = np.array(list(map(int,input().split())))\nans = 'Yes'\nM = l[0]\n\nfor i in range(1,N):\n if l[i] > l[i-1]:\n M = l[i]\n print(M,l[i])\n\n if l[i]< M-1:\n ans ='No'\n break\nprint(ans)", "import numpy as np\nN = int(input())\nl = np.array(list(ma...
['Wrong Answer', 'Accepted']
['s649399612', 's149825130']
[39028.0, 38804.0]
[349.0, 213.0]
[242, 224]
p02953
u327248573
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['from sys import stdin\n\nn = int(stdin.readline().rstrip())\nh = list(map(int, stdin.readline().rstrip().split(\' \')))\n\nif n == 1:\n print("Yes")\n exit()\nfor i in range(n-1, -1, -1):\n if h[i] - h[i+1] == 1:\n h[i] -= 1\n elif h[i] - h[i+1] > 1:\n print("No")\n exit()\nprint("Yes...
['Runtime Error', 'Accepted']
['s587373412', 's789369706']
[14708.0, 14396.0]
[45.0, 82.0]
[304, 304]
p02953
u328175869
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\nH = list(map(int, input().split(" ")))\n\nans = "Yes"\nfor i in range(N-1):\n if H[i+1] >= (H[i]-1):\n ans = "No"\n break\n\nprint(ans)', 'N = int(input())\nH = list(map(int, input().split(" ")))\n\nans = "Yes"\nfor i in range(N - 1):\n if (H[i + 1]) >= (H[i]):\n continue\...
['Wrong Answer', 'Accepted']
['s440592831', 's455278288']
[14396.0, 14252.0]
[42.0, 84.0]
[161, 247]
p02953
u329407311
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\n\nList = list(map(int,input().split()))\n\nH = 0\nck = 0\n\nfor i in range(N):\n a = List[i]\n if a-1 >= H:\n H = a-1\n else:\n ck = 1\n \nprint("Yes" if ck == 0 else "No")', 'N = int(input())\n\nList = list(map(int,input().split()))\n\nH = 0\nck = 0\n\nfor i in range(N):\n a = List[i]\...
['Wrong Answer', 'Accepted']
['s095661952', 's732644797']
[15020.0, 15020.0]
[66.0, 71.0]
[188, 225]
p02953
u330799501
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
['N = int(input())\n\nS=list(map(int,input().split()))\nans = True\nprint(S)\nma = max(S)\nmi = min(S)\n\nif ma - mi <= 1:\n print("Yes")\n\nif S.index(ma) == N -1:\n print("Yes")\nelse:\n print("No")\n\n\n', 'n = int(input())\nLists = list(map(int, input().split()))\n\nans = "Yes"\nfor i in range(1,n):\n i...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s363249422', 's987224051', 's485972785']
[14224.0, 15020.0, 14396.0]
[56.0, 60.0, 70.0]
[196, 174, 253]
p02953
u331390010
2,000
1,048,576
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i. For each square, you will perform either of the following operations once: * Decrease the height of the square by 1. * Do nothing. Determine if it is possible to perform the operations so that the height...
["N = int(input())\nH = [int(_) for _ in input().split()]\nYN = 0\n\nfor i in range(N-1):\n if H[N-i-2] > H[N-i-1]:\n H[i] -= 1\n\nfor i in range(N-1):\n if H[N-i-2] > H[N-i-1]:\n YN = 1\n break\n\nif YN == 0:\n print('Yes')\n\nelse:\n print('No')", "N = int(input())\nH = [int(_) for _ ...
['Wrong Answer', 'Accepted']
['s091730048', 's656669300']
[14252.0, 14704.0]
[99.0, 115.0]
[261, 315]