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
u683406607
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]+2 <= h[i+1]:\n print("No")\n break\nelse:\n print("Yes")', 'n = int(input())\nh = list(map(int, input().split()))\n\nbefore = h[0]\nfor i in range(1,n):\n if before > h[i]:\n print("No")\n break\n before = max(h[i]-1...
['Wrong Answer', 'Accepted']
['s333845441', 's501431677']
[14396.0, 14396.0]
[63.0, 81.0]
[143, 186]
p02953
u685662874
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()))\nmax=max(h)\nres='Yes'\nfor val in h:\n if val < max -1:\n res = 'No'\nprint(res)", "n=int(input())\nh=list(map(int,input().split()))\nmax=0\nres='Yes'\nfor i in range(n):\n if i == n -1:\n break\n if max < h[i]:\n max=h[i]\n diff = h[i...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s640994111', 's857042903', 's821751115']
[14396.0, 14396.0, 14228.0]
[54.0, 105.0, 71.0]
[133, 318, 224]
p02953
u687159441
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_new = []\nh_new.append(h[0]-1)\n\nfor i in range(1, n-1):\n if h[i+1] < h[i]:\n h_new.append(h[i]-1)\n else:\n h_new.append(h[i])\nh_new.append(h[-1])\n\nprint(h_new)\ncnt = 0\nfor i in range(n-1):\n if h_new[i] > h_new[i+1]:\n p...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s348427278', 's510882916', 's799726258', 's378822824']
[14988.0, 14396.0, 14396.0, 14396.0]
[103.0, 97.0, 99.0, 66.0]
[395, 362, 363, 211]
p02953
u687173709
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())\nH=list(map(int,input().split()))\n\nL=H\n#print(H)\nle=int(len(H))\n#maxh=max(H)\n#print(maxh)\nmaxi=np.argmax(H)\ntxt="Yes"\n\n# if H[i]<=H[maxi]-1:\n# txt="No"\n# break\n# print(txt)\n\nfor j in range(0,le-2):\n if maxi==le-1:\n pass\n else:\n ...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s335811985', 's535354900', 's769688877', 's149275761']
[23088.0, 23124.0, 23120.0, 14396.0]
[195.0, 2109.0, 211.0, 66.0]
[547, 486, 601, 200]
p02953
u689626103
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# A = []\n# for a in range(N+1):\n# A.append(int(input()))\n\nH[0] -= 1\n\nfor i in range(1, N):\n\n if H[i-1] > H[i]:\n print('NO')\n exit()\n\n H[i] = max(H[i-1], H[i] - 1)\n\nprint('YES')\n", "N = int(input())\nH = list(map(int, input()...
['Wrong Answer', 'Accepted']
['s170993019', 's729182971']
[14396.0, 14396.0]
[112.0, 105.0]
[254, 192]
p02953
u690326927
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())\nL = list(map(int, input().split()))\n\nwhile True:\n a = L.pop(0)\n if len(L) <= 0:\n break\n\n if L[0] - a > 1:\n print("No")\n sys.exit()\n\nprint("Yes")\n', 'import sys\n\nN = int(input())\nL = list(map(int, input().split()))\n\nn = L[0]\nwhile True:\n ...
['Wrong Answer', 'Accepted']
['s523343332', 's764257826']
[14252.0, 14252.0]
[1559.0, 1579.0]
[204, 232]
p02953
u693716675
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 = [int(i) for i in list(input())]\nans = True\na[0] -= 1\nfor i in range(1,n):\n if a[i]>a[i-1]:\n a[i] -= 1\n elif a[i]==a[i-1]:\n pass\n else:\n ans = False\n break\nif ans==True:\n print("Yes")\nelse:\n print("No")', 'n= int(input())\na = [int(i) for i in input().split()]\n\nli...
['Runtime Error', 'Accepted']
['s597927825', 's109395917']
[13072.0, 14396.0]
[37.0, 89.0]
[239, 213]
p02953
u693933222
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\nflag = 0\n\nif(n > 2):\n for i in range(1,n-1):\n print(h)\n if(h[i] > h[i+1] + 1):\n flag = 1\n break\n elif(h[i] == h[i+1]+1):\n if(h[i-1] == h[i]):\n flag = 1\n brea...
['Runtime Error', 'Runtime Error', 'Accepted']
['s196911742', 's362320678', 's394004212']
[142612.0, 142696.0, 14480.0]
[1629.0, 1761.0, 108.0]
[567, 440, 569]
p02953
u697572834
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...
['ccc=[list(map(int,input().split())) for i in range(2)]\n\nfor idx in range(2,n):\n if (ccc[1][idx-1] == ccc[1][idx]):\n continue\n elif (ccc[1][idx-1] - 1 == ccc[1][idx] ):\n ccc[1][idx] = ccc[1][idx-1]\n continue\n elif (ccc[1][idx-1] -1 > ccc[1][idx] ):\n print("No")\n break\n \n if (idx == n-...
['Runtime Error', 'Accepted']
['s577966748', 's295328744']
[14396.0, 14400.0]
[42.0, 101.0]
[329, 458]
p02953
u697696097
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())\nh=list(map(int,input().split()))\nif h[0]>0:\n h[0]-=1\nfor i in range(1,n):\n if h[i-1]==h[i]:\n sonomama=1\n elif h[i]>[i-1]:\n h[i]-=1\n else:\n print("No")\n\tsys.exit()\nprint("Yes")\n ', 'import sys\nn=int(input())\nh=list(map(int,input().split()))\nif h[0]>0:\n h[0]...
['Runtime Error', 'Accepted']
['s429041697', 's260681005']
[8800.0, 20720.0]
[20.0, 85.0]
[219, 224]
p02953
u699628901
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())\n\nli = list(map(int,input().split()))\n\nli.reverse()\n\nmins = 100000000000\n\nisyes = True\nfor i in li:\n if i < mins:\n mins = i\n \n if i - mins > 1:\n isyes=False\n\nif(isyes):\n print('YES')\nelse:\n print('NO')\n", "a=int(input())\n\nli = list(map(int,input().split...
['Wrong Answer', 'Accepted']
['s349291428', 's319355025']
[14396.0, 14252.0]
[57.0, 57.0]
[245, 245]
p02953
u701438499
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...
["\nimport sys\nN = int(sys.stdin.readline().strip());\nH = sys.stdin.readline().split();\nH = [int(x) for x in H]\n\nq = [0 for x in range(N)]\n\nu = H[::-1]\nq[0] = u[0]\n\n\nflag = True\n\nfor i in range(1, N):\n\t\n\tif(u[i]>=q[i-1]):\n\t\tflag = False\n\t\tbreak\n\t\n\tif(u[i]==q[i-1]+1):\n\t\t\n\t\tq[i] = u[i]-1\...
['Wrong Answer', 'Accepted']
['s613372414', 's865664581']
[14252.0, 14684.0]
[91.0, 100.0]
[560, 562]
p02953
u703890795
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\nfor i in range(N-1):\n if H(N-i-1) < H(N-i-2):\n H(N-i-2) -= 1\n \nf = 0\nfor i in range(N-1):\n if H(N-i-1) < H(N-i-2):\n f = 1\n \nif f == 0:\n print("No")\nelse:\n print("Yes")', 'N = int(input())\nH = map(int,input().split())\n\nfor i in range(N-1)...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s119620032', 's815678791', 's887502455', 's829885020']
[3064.0, 2940.0, 14396.0, 14224.0]
[17.0, 17.0, 118.0, 120.0]
[230, 229, 236, 236]
p02953
u706414019
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 for i in range(N-1,0,-1):\n if H[i] < H[i-1] :\n H[i-1] -= 1\nif sorted(H) != H:\n print('NO')\nelse:\n print('YES')", "N = int(input())\nH = list(map(int,input().split()))\nflag = 0\nif (N==1 ) or (N==2 and H[1]<=H[2]+1):\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s274995191', 's499425111', 's641538615', 's108640049']
[20764.0, 20684.0, 20828.0, 20556.0]
[78.0, 73.0, 83.0, 76.0]
[198, 349, 178, 179]
p02953
u712868001
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())\nfor i in range(N-1):\n if H[i+1] < H[i]:\n print('No')\n else:\n print('Yes')", "N=int(input())\nH=map(int, input().split())\nfor i in range(N-1):\n A=H[i+1]\n B=H[i]-1\n if A < B:\n print('No')\n else:\n print('Yes')", 'N=int(...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s121836158', 's205917618', 's230161519', 's250968655', 's304931499', 's398494424', 's524685775', 's649784978', 's738038904', 's825853751', 's954559903', 's967633600', 's036863655']
[11152.0, 11152.0, 11152.0, 14396.0, 14224.0, 11152.0, 14396.0, 11152.0, 11244.0, 11152.0, 14396.0, 2940.0, 14252.0]
[27.0, 28.0, 27.0, 71.0, 127.0, 27.0, 42.0, 27.0, 27.0, 27.0, 131.0, 17.0, 83.0]
[136, 154, 150, 313, 160, 150, 156, 132, 134, 132, 160, 132, 356]
p02953
u713465512
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())\nheights = [int(i) for i in input().split()]\nans = "Yes"\nfor i in range(N):\n if 0 < i and 1 < heights[i]-heights[i-1]:\n ans = "No"\n break\nprint(ans)', 'N = int(input())\nheights = [int(i) for i in input().split()]\nans = "Yes"\nminv = heights[0]\nfor i in range(N):\n if 1 < ...
['Wrong Answer', 'Accepted']
['s002957481', 's195201361']
[14396.0, 14396.0]
[66.0, 84.0]
[181, 215]
p02953
u717626627
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 if h[i-1] == h[i]:\n continue\n elif h[i-1] == h[i] - 1:\n continue\n else:\n print('No')\n exit()\n\nprint('Yes')", "n = int(input())\nh = list(map(int, input().split()))\n\nfor i in range(1, n):\n if h[i-1] == h[i]:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s337030007', 's346103443', 's843562043']
[15020.0, 14396.0, 14396.0]
[58.0, 61.0, 82.0]
[198, 211, 181]
p02953
u721425712
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):\n H[i] -= 1\n\nfor j in range(N-1):\n if H[j] > H[j+1]:\n H[j+1] += 1\nprint(H)\n\nif H == sorted(H):\n print('Yes')\nelse:\n print('No')", "N = int(input())\nH = list(map(int, input().split()))\n\nfor i in range(1, N):\n ...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s441365457', 's602516748', 's701255714', 's825161430']
[14704.0, 14396.0, 15020.0, 14396.0]
[122.0, 67.0, 102.0, 114.0]
[218, 174, 174, 209]
p02953
u722189950
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()))\nok = True\n\nfor i in range(N - 2):\n if (H[i] >= H[i + 1] and H[i + 1] > H[i + 2]) or (H[i] > H[i + 1] and H[i + 1] >= H[i + 2]) or H[i]-H[i+1]>1:\n ok = False\nif N >= 2 and H[-2] - H[-1] > 1:\n ok = False\n\nif ok:\n print("Yes")\nelse:\n p...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s584135928', 's719789897', 's632342281']
[14224.0, 14396.0, 14252.0]
[110.0, 44.0, 82.0]
[316, 194, 187]
p02953
u724245932
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()))\nc = 0\nfor i in range(N-1):\n if H[i] > H[i+1]:\n H[i+1] = H[i+1] + 1\n if H[i] <= H[i+1]:\n C += 1\nif C == N-1:\n print('Yes')\nelse:\n print('No')\n", "N = int(input())\nH = list(map(int, input().split()))\nc = 0\nfor i in range(N-1):\n if H[i] > H[...
['Runtime Error', 'Accepted']
['s478635842', 's680048560']
[14224.0, 14228.0]
[91.0, 95.0]
[204, 204]
p02953
u724844363
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-2):\n if N == 1 or (H[i] <= H[i+1] and (-1 <= H[i+2]-H[i+1])):\n continue\n else:\n print("No")\n exit()\nprint("Yes")', 'N = int(input())\nH = list(map(int, input().split()))\nli = H[0]\nfor i in H[1:]:\n if i < li:...
['Wrong Answer', 'Accepted']
['s446318081', 's632711802']
[14396.0, 14396.0]
[80.0, 58.0]
[209, 204]
p02953
u727787724
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,0,-1):\n if h[i]>h[i-1]:\n continue\n elif h[i]+1==h[i-1]:\n h[i-1]-=1\n else:\n ans='No'\nprint(ans)", "n=int(input())\nh=list(map(int,input().split()))\nans='Yes'\ncount=0\nfor i in range(n-1,0,-1):\n if...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s274103042', 's324783717', 's490414268', 's633398122', 's719764640']
[14396.0, 15020.0, 14224.0, 14832.0, 14396.0]
[82.0, 94.0, 162.0, 160.0, 78.0]
[201, 206, 217, 218, 203]
p02953
u728566015
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\np = H[0]\nfor i in range(1, N):\n print(p)\n if p <= H[i]:\n p = H[i]\n elif p - 1 == H[i]:\n p -= 1\n cnt += 1\n if cnt >= 2:\n print("No")\n break\n else:\n print("No")\n break...
['Wrong Answer', 'Accepted']
['s267581884', 's389759646']
[14396.0, 14252.0]
[138.0, 82.0]
[325, 447]
p02953
u729119068
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(int(input()) for _ in range(N))\nM=L[::-1]\nfor i in range(N-1):\n if M[i]+1<M[i+1]:\n print('No')\n break\n elif M[i]+1=M[i+1]:\n M[i+1]=M[i]\nelse:print('Yes')", "N=int(input())\nL=list(int(input()) for _ in range(N))\nM=L[::-1]\nfor i in range(N-1):\n if M[i]+1<...
['Runtime Error', 'Runtime Error', 'Accepted']
['s106428309', 's315903139', 's127530044']
[9044.0, 11104.0, 20696.0]
[25.0, 31.0, 85.0]
[202, 203, 197]
p02953
u729535891
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(n - 1):\n if H[i] - H[i + 1] > 1:\n flag = False\n elif H[i] == H[i + 1]:\n continue\n elif H[i] - H[i + 1] == 1:\n H[i + 1] += 1\n\nprint(flag)', "n = int(input())\nH = list(map(int, input().split()))\nfl...
['Wrong Answer', 'Accepted']
['s378308584', 's305791534']
[14252.0, 14224.0]
[99.0, 78.0]
[246, 233]
p02953
u736729525
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 debug(*args):\n if 1 == 1:\n print(*args)\n\ndef solve(N, A):\n for i in range(1, N):\n if A[i-1] > A[i] + 1:\n return "No"\n elif A[i-1] + 1 == A[i]: #\n A[i] -= 1\n elif A[i-1] == A[i]: \n pass\n elif A[i-1] + 1 < A[i]:\n A[i] ...
['Wrong Answer', 'Accepted']
['s955044639', 's888010491']
[14400.0, 14252.0]
[46.0, 74.0]
[549, 373]
p02953
u738898077
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_h= list(map(int,input().split()))\ncheck = 0\nfor i in range(n-1):\n if list_h[i+1] >= list_h[i]:\n list_h[i] -= 1\n check = 0\n elif list_h[i+1] < list_h[i] - 1:\n check = 2\n break\n elif list_h[i+1] == list_h[i] - 1:\n list_h[i] -= 1\n check...
['Wrong Answer', 'Accepted']
['s122732584', 's121545061']
[14704.0, 14396.0]
[90.0, 107.0]
[388, 459]
p02953
u739959951
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()))\n\na='Yes'\nif N>1:\n for i in range(N-1):\n if l[i]=l[i+1]:\n continue\n elif l[i]<l[i+1]:\n l[i+1]-=1\n else:\n a='No'\n \nprint(a)", "N=int(input())\nl=list(map(int,input().split()))\n\nif N>=2:\n for i in range(N):\n if l[i]<=l[i+1]:...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s058543631', 's060189081', 's168079719', 's296540377', 's331637178', 's391817029', 's405426206', 's547038386', 's642366527', 's644901101', 's786380804', 's819752168', 's964792300', 's972206212', 's985289613', 's996323921']
[2940.0, 14396.0, 2940.0, 14276.0, 2940.0, 11152.0, 11152.0, 3060.0, 2940.0, 3060.0, 2940.0, 2940.0, 14228.0, 14252.0, 2940.0, 14396.0]
[17.0, 129.0, 17.0, 151.0, 17.0, 27.0, 28.0, 17.0, 17.0, 17.0, 17.0, 17.0, 134.0, 70.0, 18.0, 71.0]
[197, 211, 217, 205, 206, 215, 229, 211, 206, 213, 175, 206, 213, 260, 175, 320]
p02953
u741183598
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()))\n\nresult = "YES"\n\nfor i in range( N-2, -1,-1):\n if list[i] > list[i+1]:\n list[i] -=1\n if list[i] > list[i+1]:\n result = "NO"\n break\n\nprint(result)', 'N = int(input())\nlist = list(map(int, input().split()))\n\nresult = "YES"\n\nfor i ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s067851688', 's132018458', 's219547557']
[14396.0, 15020.0, 14224.0]
[67.0, 67.0, 67.0]
[218, 218, 218]
p02953
u742036388
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())\nh = list(map(int, input().split()))\n\nh = np.array(h)\n\nfor i in range(len(h)-1):\n if h[i] < h[i+1]:\n h[i+1] -= 1\nprint(h)\nnp.diff(h-1, n=1)\n\nminus = [i for i in np.diff(h-1, n=1) if i < 0]\n\nif len(minus) > 0:\n print('No')\nelse:\n print('Yes')\n", "impor...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s019810323', 's084001838', 's453482820', 's558651149', 's824048088', 's949161028', 's115650728']
[23112.0, 3060.0, 14848.0, 5296.0, 5296.0, 5420.0, 23076.0]
[409.0, 17.0, 154.0, 19.0, 19.0, 22.0, 425.0]
[291, 283, 283, 452, 329, 450, 287]
p02953
u745223262
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] -= 1\nflag = True\nfor i in range(n - 1):\n print(i)\n if h[i] > h[i + 1]:\n flag = False\n break\n elif h[i] <= h[i + 1] - 1:\n h[i + 1] -= 1\n\nif flag:\n print("Yes")\nelse:\n print("No")\n', 'n = int(input())\nh = list...
['Wrong Answer', 'Accepted']
['s116506226', 's251794063']
[14396.0, 14252.0]
[169.0, 90.0]
[272, 274]
p02953
u746849814
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(0, n-1):\n if h[i] > h[i+1] -1:\n print('No')\nelse:\n print('Yes')", "n = int(input())\nh = list(map(int, input().split()))\n\nfor i in range(0, n-1):\n if h[i] > h[i+1] -1:\n print('No')\n break\n h[i+1] -= 1\ne...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s319260386', 's631248325', 's860458359']
[14252.0, 15020.0, 14396.0]
[120.0, 80.0, 80.0]
[145, 175, 215]
p02953
u747427153
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(i) for i in input().split()]\nif h[j+1] - h[j] < -1 for j in range(n):\n print("No")\nelif h[k+2] < h[k+1] and h[k+1] <= h[k] for k in range(n-1):\n print("No")\nelse:\n print("Yes")\n', 'n = int(input())\nh = [int(i) for i in input().split()]\nfor j in range(n):\n if h[j] - h[j+1] < -1...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s135675614', 's171196853', 's658443580', 's660445515', 's757180704', 's880215283', 's909204100', 's941982424', 's943500306', 's945489445', 's610990775']
[2940.0, 14396.0, 14252.0, 14224.0, 14396.0, 2940.0, 14396.0, 2940.0, 2940.0, 14252.0, 14396.0]
[17.0, 98.0, 94.0, 65.0, 66.0, 17.0, 2104.0, 17.0, 17.0, 79.0, 94.0]
[206, 217, 212, 269, 268, 206, 236, 273, 207, 271, 183]
p02953
u753682919
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]>=H[i+1]:\n H[i]-=1\nif H==sorted(H):\n print("Yes")\nelse:\n print("No")\n', 'N=int(input())\nH=list(map(int,input().split()))\nH[0]-=1\nfor i in range(1,N):\n if H[i-1]<H[i]:\n H[i]-=1\nif H==sorted(H):\n print("Yes")\nelse:\...
['Wrong Answer', 'Accepted']
['s406749156', 's399685176']
[14396.0, 14252.0]
[96.0, 97.0]
[152, 158]
p02953
u753803401
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] -= 1 if h[0] > 0 else 0\nfor i in range(1, n):\n if h[i] > h[i-1]:\n h[i] -= 1\n if h[i] < h[i-1]:\n print("NO")\n exit()\nprint("YES")\n', 'n = int(input())\nh = list(map(int, input().split()))\nh[0] -= 1 if h[0] > 0 else 0\nfor i...
['Wrong Answer', 'Accepted']
['s201938637', 's100447955']
[14396.0, 15020.0]
[94.0, 84.0]
[214, 214]
p02953
u758223800
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 = 1\nfor i in range (n):\n if (h[i]-h[n-1] >= 2 or h[0]-h[i] <= 2):\n ans = 0\n break\n\nif (ans == 1):\n print("Yes")\n\nelse :\n print("No")', 'n = int(input())\nh = list(map(int,input().split()))\n\nans = 1\nm = h[0]\nfor i in range...
['Wrong Answer', 'Accepted']
['s039454885', 's501423258']
[14396.0, 14252.0]
[44.0, 62.0]
[212, 235]
p02953
u759412327
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"\n\nfor i in range(N-1):\n if H[i]<H[i+1]:\n pass\n else:\n H[i]-=1\n\nfor i in range(N-1):\n if H[i]>H[i+1]:\n a = "No"\n\nprint(a)\n', 'N = int(input())\nH = list(map(int,input().split()))\na = "Yes"\n\nfor i in range(N-1):\n if H[i]<H[i+1]...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s168572371', 's917107092', 's706647763']
[14396.0, 14252.0, 20480.0]
[83.0, 96.0, 76.0]
[194, 193, 138]
p02953
u759726213
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\nans = True\n\nn = 4\nh = [1,3,2,1]\nfor i in range(1,n):\n \n if h[i-1] > h[i]:\n h[i-1] -= 1\n if h[i-1] > h[i]:\n ans = False\n break\nfor i in range(1,n):\n \n if h[i-1] > h[i]:\n ans = False\n\nif ans:\n p...
['Wrong Answer', 'Accepted']
['s686733397', 's003286544']
[11152.0, 14396.0]
[27.0, 78.0]
[346, 263]
p02953
u760760982
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 = list(map(int,input().split()))\nfor i in range(N-1,0,-1):\n print(i)\n n = height[i] - height[i-1]\n if n <= -2:\n print("No")\n exit()\n elif n == -1:\n height[i-1] -= 1\n\nprint("Yes")', 'N = int(input())\nheight = list(map(int,input().split()))\nfor i in ...
['Wrong Answer', 'Accepted']
['s194629564', 's501637975']
[20740.0, 20768.0]
[103.0, 73.0]
[235, 221]
p02953
u761087127
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(n) for n in input().split()]\nm = H[N-1]\nfor i in range(0, N-1)[::-1]:\n if H[i] > m+1:\n return 'No'\n else:\n m = H[i]\nreturn 'Yes'\n", "N = int(input())\nH = [int(n) for n in input().split()]\nm = H[N-1]\nans = 'Yes'\nfor i in range(0, N-1)[::-1]:\n if H[i] > m+1...
['Runtime Error', 'Accepted']
['s675563785', 's437641108']
[2940.0, 14396.0]
[17.0, 76.0]
[175, 239]
p02953
u761471989
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\nh_list = list(map(int, input().split()))\n\npre0_j = h_list[0]\npre_j = h_list[0]\nf = 0\nfor j in h_list[1:]:\n if pre0_j > j or pre_j > j:\n f = 1\n break\n else:\n pre_j = j\n\nif f == 1:\n print('No')\nelse:\n print('Yes')", "N = int(input())\n\nh_list = list(m...
['Wrong Answer', 'Accepted']
['s740853655', 's985330246']
[14396.0, 15020.0]
[58.0, 61.0]
[262, 259]
p02953
u763249708
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\nmini = h[0]\nfor i in range(1,n-1):\n \n if h[i]-1 > mini:\n print("No")\n exit()\n else:\n mini = h[i]\n \nif h[n] <= h[n-1]:\n print("No")\n exit()\n \nprint("Yes")', 'n = int(input())\nh = list(map(int, input().s...
['Runtime Error', 'Accepted']
['s120907318', 's991447780']
[14396.0, 14252.0]
[62.0, 70.0]
[253, 215]
p02953
u765590009
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())\nhn = [int(num) for num in input().split()]\n\nanswer = 0\ncount = 0\n\nif len(hn) != 1: \n for h in range(len(hn)-1,0,-1):\n if hn[h] - hn[h-1] == 0:\n pass\n elif hn[h] - hn[h-1] == 1:\n hn[h-1] -= 1\n else :\n print("No")\n break\n if h == 1:\n print("Yes")\n...
['Wrong Answer', 'Accepted']
['s497766021', 's429524548']
[20832.0, 20416.0]
[63.0, 72.0]
[322, 206]
p02953
u765758367
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()))\nprint(H[-1])\nprint(max(H))\nif abs(H[-1] - max(H)) >= 2:\n print('No')\nelse:\n print('Yes')\n", "n = int(input())\nH = list(map(int, input().split()))\nfor i in range(n-1, 1, -1):\n if H[i - 1] - H[i] > 1:\n print('No')\n exit()\n elif...
['Wrong Answer', 'Accepted']
['s436494612', 's202572727']
[14396.0, 15020.0]
[48.0, 78.0]
[148, 204]
p02953
u766566560
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 H == 1:\n print('Yes')\n exit()\n\nif H == 2 and H[0] <= H[1]:\n print('Yes')\n exit()\nelif H == 2 and H[0] > H[1]:\n print('No')\n exit()\n\nfor i in range(1, N-1):\n # 4,4,4(4,4,5 4,5,5 5,5,5) or 4,5,4\n if H[i-1] <= H[i] <= H[i+1] or H[i-1] <= H[...
['Runtime Error', 'Accepted']
['s108614502', 's331377780']
[14484.0, 14396.0]
[73.0, 80.0]
[540, 233]
p02953
u767545760
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())\ncells = list(map(int, input().split()))\ncount = []\n\nfor i in range(N-2):\n if cells[N - 1 - i] - cells[N - 2 - i] <= -2:\n print('No')\n break\n elif cells[N - 1 - i] - cells[N - 2 - i] == -1:\n cells[N - 2 - i] = cells[N - 2 - i] - 1\n else:\n count.append('o...
['Wrong Answer', 'Accepted']
['s871870057', 's441018088']
[14396.0, 14228.0]
[104.0, 96.0]
[368, 430]
p02953
u767664985
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 i < N - 2:\n elif H[i] > H[i + 1] > H[i + 2]:\n print("No")\n exit()\n elif i < N - 1:\n if H[i] > H[i + 1] + 1:\n print("No")\n exit()\nprint("Yes")\n', 'N = int(input())\nH ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s055862603', 's843007837', 's943460558', 's045393988']
[2940.0, 14224.0, 14224.0, 14396.0]
[17.0, 42.0, 2104.0, 84.0]
[282, 169, 251, 175]
p02953
u768896740
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()))\ndiff = []\n\n\nfor i in range(n-1):\n diff.append(h[i+1]-h[i])\n\nfor i in range(n-1):\n if diff[i] <= -2:\n print('No')\n exit()\n\nfor i in range(n-2):\n if diff[i] == -1 and diff[i+1] == -1:\n print('No')\n exit()\n\nif h[-...
['Wrong Answer', 'Accepted']
['s838523838', 's774186108']
[14396.0, 14396.0]
[85.0, 86.0]
[355, 227]
p02953
u769698512
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()))\nprev_prev = -1\nprev = -1\nflag = False\nfor v in hs:\n print(prev_prev, prev, v)\n if v <= prev - 1 and v < prev_prev - 1:\n flag = True\n break\n prev_prev = prev\n prev = v\nif flag:\n print('No')\nelse:\n print('Yes')\n", "n =...
['Wrong Answer', 'Accepted']
['s457851679', 's610096666']
[14396.0, 14224.0]
[205.0, 66.0]
[295, 267]
p02953
u771167374
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(1, n):\n if h[i]<h[i-1]:\n h[i] -= 1\n if h[i]<h[i-1]:\n print('No')\n exit()\nprint('Yes')", 'N = int(input())\nH = list(map(int, input().split()))\na = H[0]\nfor i in range(1,N-1):\n a = max(H[i], a)\n ...
['Wrong Answer', 'Accepted']
['s494152323', 's716994945']
[14252.0, 14224.0]
[62.0, 90.0]
[192, 187]
p02953
u772588522
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\nflag = True\nmemo = h[0]\n\nfor i in range(n-1):\n if h[i] >= h[i+1]:\n h[i] -= 1\n if h[i] < memo:\n flag = False\n break\n elif h[i] == h[i + 1]:\n memo = h[i + 1]\n continue\n else:\n flag = False\n break\n\nif fl...
['Wrong Answer', 'Accepted']
['s690709665', 's638367078']
[14396.0, 14252.0]
[79.0, 91.0]
[337, 444]
p02953
u773440446
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-1):\n if h[i-1] <= h[i] <= h[i+1]:\n continue\n else:\n if h[i]>h[i+1]:\n h[i] -= 1\n if h[i]< h[i-1]:\n print('No')\n exit()\n\nfor i in range(1,n-1):\n if not h[i-1]=...
['Runtime Error', 'Accepted']
['s111029732', 's727358918']
[9040.0, 20668.0]
[23.0, 83.0]
[369, 180]
p02953
u775051447
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 = input()\nH_list = list(map(int, input().split()))\nH_edit_list = [0, 0]\n\nfor h in H_list:\n if h - H_edit_list[-1] <= 0:\n H_edit_list[-1] -= 1\n if H_edit_list[-2] > H_edit_list[-1]:\n print('No')\n exit()\n H_edit_list.append(h)\n\nif H_edit_list[-2] > H_edit_list[-1]:\n print...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s128863100', 's762596479', 's970393410', 's615242846']
[14252.0, 14252.0, 14252.0, 14396.0]
[84.0, 85.0, 131.0, 75.0]
[360, 335, 362, 313]
p02953
u775421443
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())\nnums = list(map(int, input().split()))\n\nfor x in range(n-1)\n \tif nums[x] > nums[x+1]:\n \tnums[x] -= 1\n\n if nums[x] > nums[x+1]:\n \tprint('No')\n \tsys.exit()\n\nprint('Yes')", "import sys\n\ninput = sys.stdin.readline\n_ = int(input())\nnums = map(int, input()....
['Runtime Error', 'Accepted']
['s656499693', 's331748575']
[2940.0, 11308.0]
[18.0, 59.0]
[213, 231]
p02953
u775681539
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...
["#python3\nn=int(input())\nh=[int(i) for i in input().split()]\n\nok = True\nfor i in range(n-1):\n if not (h[i] <= h[i+1]):\n ok = False\n\nif ok:\n print('Yes')\nelse:\n print('No')", "#python3\nn=int(input())\nh=[int(i) for i in input().split()]\n\ndef solve():\n h[0]-=1\n for i in range(1,n):\n if h[i] ...
['Wrong Answer', 'Accepted']
['s467349887', 's648934882']
[14396.0, 14252.0]
[63.0, 72.0]
[176, 269]
p02953
u776338097
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 import sys\n input = sys.stdin.readline\n \n n = int(input().split())\n arr = list(map(int, input().split()))\n \n ok = 1\n for i in reversed(range(n - 1)):\n if arr[i] > arr[i + 1]:\n arr[i] -= 1\n if arr[i] > arr[i + 1]:\n ok = 0\n \n i...
['Runtime Error', 'Accepted']
['s456169389', 's472802961']
[3060.0, 14252.0]
[17.0, 66.0]
[386, 378]
p02953
u780750802
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...
['5\n1 2 1 1 3', 'def main():\n N = int(input())\n A = list(map(int, input().split(\' \')))\n\n for i in range(1, N):\n if A[i - 1] > A[i]:\n return "No"\n elif A[i] != A[i - 1]:\n A[i] -= 1\n return "Yes"\nprint(main())\n']
['Runtime Error', 'Accepted']
['s368593495', 's897718083']
[2940.0, 14396.0]
[17.0, 70.0]
[11, 239]
p02953
u780962115
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())\ns=list(map(int,input().split()))\nflag=True\nfor i in range(N-1):\n if s[i+1]-s[i]<=-2:\n flag=False\n break\n elif -1<=s[i+1]-s[i]<=0:\n s[i]=s[i]-1\n elif s[i+1]-s[i]>=1:\n s[i+1]=s[i+1]-1\n \nfor i in range(N-1):\n if s[i]>s[i+1]:\n flag=False\n ...
['Wrong Answer', 'Accepted']
['s105965124', 's358340773']
[14396.0, 14252.0]
[131.0, 112.0]
[384, 546]
p02953
u781262926
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[0] -= 1\nfor i in range(1, n):\n if H[i] < H[i-1]:\n H[i] -= 1\nprint('Yes' if reduce(lambda x, y: x <= y, H) else 'No')", "n = int(input())\nH = list(map(int, input().split()))\n\nH[0] -= 1\nfor i in range(1, n):\n if H[i] < H[i-1]:\n H[i...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s015625843', 's233605611', 's420427844', 's500375778', 's861166275', 's964833894', 's766049292']
[14396.0, 14252.0, 14396.0, 15020.0, 14396.0, 15020.0, 14396.0]
[68.0, 75.0, 70.0, 74.0, 91.0, 88.0, 81.0]
[182, 193, 193, 210, 262, 262, 194]
p02953
u781755665
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\ninput = sys.stdin.readline\n\nN = int(input().strip())\nHs = list(map(int, input().strip().split(' ')))\n\ncurrent_max = 1\nfor i in range(N - 1):\n former = Hs[i]\n latter = Hs[i + 1]\n if former > latter and former > current_max:\n Hs[i] -= 1\n current_max = max(Hs[i], Hs[i+1])\n\n ...
['Wrong Answer', 'Accepted']
['s798950094', 's111540537']
[14396.0, 14252.0]
[113.0, 83.0]
[378, 306]
p02953
u782426050
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\nans = True\nfor i in range(n-1):\n dis = h[i] - h[i+1]\n if dis >= 1:\n continue\n elif dis == 0:\n h[i+1] -= 1\n continue\n else:\n ans = False\n break\n\nif ans:\n print('Yes')\nelse:\n print('No')\n \n", "n = int(input())\nh = [int(x)...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s787110942', 's860603525', 's953794691']
[14396.0, 14396.0, 14396.0]
[67.0, 68.0, 70.0]
[265, 266, 273]
p02953
u788023488
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(i) for i in input().split()] # input:"1 2 3 4 5"\nans = 0\nfor i in range(n-1):\n if min(h)+1<h[i]:\n ans = 1\n break\n else:\n if min(h)+1==h[i]:\n h[i]-=1\nif sorted(h)==h:\n print(\'Yes\')\nelse:\n print(\'No\')\nif ans == 1:\n print(\'No\')\nelif sorted(h)==h:\n prin...
['Wrong Answer', 'Accepted']
['s287108945', 's964282153']
[14396.0, 14396.0]
[2108.0, 96.0]
[323, 299]
p02953
u788703383
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...
["for i in range(n-1):\n if h[i] < h[i+1]:\n h[i+1] -= 1\n\n elif h[i] > h[i+1]:\n print('No')\n exit()\n\nprint('Yes')", "n = int(input())\nh = list(map(int,input().split()))\n\nfor i in range(n-1):\n print(h)\n if h[i] < h[i+1]:\n h[i+1] -= 1\n\n elif h[i] > h[i+1]:\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s011190978', 's508797006', 's654951517']
[2940.0, 142528.0, 14396.0]
[17.0, 1649.0, 76.0]
[136, 202, 198]
p02953
u791527495
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()))\nout_count = 0\n\n\nfor j in range(N - 1 , 0 , -1):\n if li[j] >= li[j - 1] + 2:\n out_count += 1\n elif li[j] == li[j - 1] + 1:\n li[j - 1] -= 1\n\nif li[0] > li[1] + 1:\n out_count += 1\n \nif out_count == 0:\n print('Yes')\nelse:\n print('No')", "...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s478136544', 's726668385', 's784163051', 's811392114', 's848227396', 's928067925', 's449497433']
[14224.0, 14704.0, 14252.0, 14252.0, 15020.0, 14252.0, 14224.0]
[82.0, 83.0, 82.0, 82.0, 82.0, 82.0, 86.0]
[297, 293, 292, 292, 252, 292, 251]
p02953
u796867346
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\nprev = H[0]\nfor i in range(1,N):\n if prev < H[i]:\n H[i] -= 1\n prev = H[i]\n continue\n if prev == H[i]\n continue\n print('No')\n return\nprint('Yes')\n", "N = int(input())\nH = list(map(int, input().split()))\n\nprev = H[0]\nfor i in range(...
['Runtime Error', 'Runtime Error', 'Accepted']
['s052629393', 's135718975', 's389324538']
[2940.0, 2940.0, 14224.0]
[17.0, 17.0, 69.0]
[215, 216, 251]
p02953
u797016134
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...
['print("Yes")\n\nn = int(input())\nh = list(map(int, input().split()))\nh[0]-=1\nfor i in range(n-1):\n if h[i] > h[i+1]:\n h[i] = h[i]-1\n\nif all(h[i] <= h[i+1] for i in range(n-1)):\n print("Yes")\n exit()\nprint("No")', 'n = int(input())\nh = list(map(int, input().split()))\nh[0] -= 1\nfor ...
['Wrong Answer', 'Accepted']
['s172555252', 's925895763']
[14396.0, 14224.0]
[76.0, 76.0]
[232, 222]
p02953
u798894056
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\nresult = "Yes"\n\nfor i in range(1, N):\n if H[i] == H[i - 1] + 1:\n H[i] -= 1\n elif H[i] == H[i - 1]:\n continue\n else:\n result = "No"\nprint(result)', 'N = int(input())\nH = list(map(int, input().split()))\n\nresult = "Yes"\...
['Wrong Answer', 'Accepted']
['s516946816', 's605693899']
[14396.0, 14224.0]
[76.0, 77.0]
[229, 240]
p02953
u802341442
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 h[i] = h[i] - 1\nflag = True\nfor i in range(n):\n if h[i+1] < h[i]:\n flag = False\n break\nif flag == True:\n print('Yes')\nelse:\n print('No')", "n = int(input())\nh = list(map(in...
['Runtime Error', 'Accepted']
['s764645357', 's865834980']
[14252.0, 14396.0]
[82.0, 81.0]
[268, 280]
p02953
u807864121
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] - H[-1] > 1 or H[i] - H[i + 1] > 1:\n ans = 'No'\n break\n elif H[0] >= H[1] or H[i] > H[i + 1]:\n ans = 'No'\n break\nprint(ans)", "N = int(input())\nH = list(map(int, input().split(...
['Wrong Answer', 'Accepted']
['s620558973', 's072912701']
[14252.0, 14396.0]
[97.0, 78.0]
[254, 270]
p02953
u809457879
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()))\nfor n in range(N):\n if l[N-n-1] - l[N-n] > 1:\n print('No')\n break\n elif 0 < l[N-n-1] - l[N-n] <= 1:\n l[N-n-1] -= 1\n else:\nprint('Yes')", "import sys\nN = int(input())\nl = list(map(int,input().split()))\nfor n in range(N-2,0,-1):\n if l[n] > l[...
['Runtime Error', 'Accepted']
['s618212905', 's182184913']
[2940.0, 14396.0]
[17.0, 75.0]
[198, 186]
p02953
u810625173
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\nprev = Hs[0]\nflag = True\nfor i in range(1,len(Hs)):\n if Hs[i] <prev:\n\tflag = False\n\tbreak\n elif Hs[i] == prev:\n\tprev = Hs[i]\n else:\n\tprev = Hs[i]-1\nif flag:\n print("Yes")\nelse:\n print("No")\n\n', 'N = int(input())\nHs = list(map...
['Runtime Error', 'Accepted']
['s967426688', 's280356485']
[2940.0, 15020.0]
[17.0, 71.0]
[261, 280]
p02953
u811436126
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()]\nh.reverse()\n\nflag = True\n\nfor i in range(1, n):\n print(h, i)\n\n if h[i - 1] >= h[i]:\n continue\n elif h[i] == h[i - 1] + 1:\n h[i] -= 1\n else:\n flag = False\n break\n\nprint('Yes') if flag else print('No')\n", "n...
['Runtime Error', 'Accepted']
['s158009337', 's506564580']
[142532.0, 14252.0]
[1659.0, 73.0]
[295, 278]
p02953
u812587837
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()))\nisYes = True\ntmpmin = 10**9+1\nfor i in range(1, n):\n if h[n-(i+1)] < tmpmin:\n tmpmin = h[n-(i+1)]\n if h[n-i] - h[n-(i+1)] >= 2 or h[n-i] - tmpmin >=2:\n isYes = False\n break\nif isYes:\n print('Yes')\nelse:\n print('No')", "...
['Wrong Answer', 'Accepted']
['s784339603', 's076572560']
[14396.0, 15020.0]
[99.0, 111.0]
[301, 294]
p02953
u814271993
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()) \nc=list(map(int, input().split()))\nans = 0\n\nif n == 1:\n print('Yes')\n exit()\nif n >= 2:\n for i in range(n-1):\n if c[i] > c[i+1] +1:\n print('No')\n exit()\n if c[i] == c[i+1] +1:\n ans = max(ans,c[i])\n if c[i+1] < ans:\n ...
['Wrong Answer', 'Accepted']
['s913977698', 's139993835']
[20760.0, 20800.0]
[77.0, 87.0]
[362, 438]
p02953
u820357030
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()))\nlenH = len(H)\nfor i in range(lenH-1):\n h_2 = H[lenH-i]\n h_1 = H[lenH-i-1]\n if h_2 < h_1:\n if h_1 - h_2 > 1:\n print('No')\n break\n else:\n\t H[lenH-i-1] -= 1\nprint('Yes')", "N = int(input())\nH = list(map(int, input().split()))\nlenH = ...
['Runtime Error', 'Accepted']
['s688054562', 's441418051']
[3068.0, 14396.0]
[17.0, 87.0]
[239, 283]
p02953
u821284362
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\nH_ls = list(map(int,input().split("")))\n\nh_left = H_ls[0]-1\n\nans = "Yes"\nfor h in H_ls:\n if h_left < h:\n h-=1:\n elif h_left > h:\n ans = \'No\'\n break:\n h_left = h\n\nprint(ans)\n', 'N = int(input())\n\nH_ls = list(map(int,input().split(" ")))\n\nh_left = H_...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s264871779', 's815462353', 's841123176', 's844209430', 's450610279']
[2940.0, 2940.0, 37804.0, 2940.0, 14252.0]
[17.0, 17.0, 807.0, 18.0, 60.0]
[221, 222, 523, 222, 220]
p02953
u823585596
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 for i in range(N-1):\n if H[i]<=H[i+1]-1:\n H[i+1]-=1\n if H[i]>H[i+1]:\n print('NO')\n exit()\n print('YES')\nelse:\n print('YES')", "N=int(input())\nH=list(map(int,input().split()))\nif N>1:\n for ...
['Wrong Answer', 'Accepted']
['s545384032', 's447346234']
[20636.0, 20624.0]
[87.0, 86.0]
[236, 236]
p02953
u823885866
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 math\nimport itertools\nimport collections\nimport heapq\nimport re\nimport numpy as np\n\nrr = lambda: sys.stdin.readline().rstrip()\nrs = lambda: map(str, sys.stdin.buffer.readline().split())\nri = lambda: int(sys.stdin.buffer.readline())\nrm = lambda: map(int, sys.stdin.buffer.readline().split()...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s492585009', 's708549393', 's354710614']
[22024.0, 21552.0, 21540.0]
[355.0, 180.0, 192.0]
[507, 507, 576]
p02953
u825115925
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())\narr=list(map(int,input().split()))\nans=1\nkari=1\nfor i in range(N-1):\n kari=max(kari,arr[i]-1)\n print(i,kari,ans)\n if kari>arr[i+1]:\n ans=0\n print(i,kari,ans)\n break\n\n\n \nif ans==0:\n print("No")\nelse:\n print("Yes")\n', 'N=int(input())\narr=list(map(...
['Wrong Answer', 'Accepted']
['s041253793', 's867608072']
[20608.0, 20712.0]
[152.0, 88.0]
[267, 233]
p02953
u826929627
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())\nlis = list(map(int,input().split()))\nlis[0]-=1\n\nprint(lis)\nfor i in range(n-1):\n if lis[i] < lis[i+1]:\n lis[i+1] -= 1\n elif lis[i] > lis[i+1]:\n print("No")\n exit()\nprint("Yes")', 'import sys\n"""\nfor line in sys.stdin:\n A, B, C = map(int, line.split())\n"""\nN = int(input()...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s611123582', 's969708489', 's050957529']
[14396.0, 15020.0, 15020.0]
[88.0, 64.0, 76.0]
[204, 312, 193]
p02953
u831311378
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 = input()\nh = [int(i) for i in input().sprit()]\n\nmax = 0\ni = 0\ny = 1\nfor i in range(n):\n if h[i] > max:\n max = h[i]\n elif h[i] < max-1:\n y = 0\n \nif y==1:\n print("Yes")\nelse:\n print("No")\n', 'n = input()\nh = [int(i) for i in input().sprit()]\n\nmax = 0\ny = 1\nfor i in r...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s119131895', 's291702253', 's387971753', 's728693759', 's821505791', 's882263740', 's300431051']
[5296.0, 2940.0, 14396.0, 2940.0, 2940.0, 5976.0, 14396.0]
[19.0, 18.0, 48.0, 18.0, 17.0, 19.0, 67.0]
[218, 226, 218, 232, 237, 232, 228]
p02953
u833543158
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(i) for i in input().split()]\n\nlastHeight = 0\nfor idx in range(len(H)):\n if H[idx] < lastHeight:\n print("NO")\n break\n elif H[idx] == lastHeight:\n lastHeight = H[idx]\n else:\n lastHeight = H[idx] - 1\nelse:\n print("YES")\n', 'N = int(input())\...
['Wrong Answer', 'Accepted']
['s220577890', 's086138400']
[14396.0, 14396.0]
[76.0, 73.0]
[283, 283]
p02953
u840958781
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]>=h[i+1]:\n h[i]-=1\nfor i in range(n-1):\n if h[i]>h[i+1]:\n print("No")\n quit()\nprint("Yes")', 'n=int(input())\nh=list(map(int,input().split()))\nh[0]-=1\nfor i in range(n-1):\n if h[i]>h[i+1]:\n h...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s114864898', 's184773218', 's021415984']
[15020.0, 142624.0, 14704.0]
[83.0, 1621.0, 107.0]
[194, 214, 218]
p02953
u845148770
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()))\ncheck = 0\n\nfor i in range(0,N-1):\n if(H[i-1] - H[i] == 1):\n H[i-1] -= 1\n elif(H[i-1] -H[i] >= 2):\n check = 1\n \nif(check == 1):\n\tprint("No")\nelse:\n\tprint("Yes")', 'n = int(input())\nh = list(map(int,input().split()))\n \nfor i in reversed(ra...
['Wrong Answer', 'Accepted']
['s241447126', 's989237883']
[14396.0, 14224.0]
[82.0, 78.0]
[222, 207]
p02953
u846634344
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\nif sys.platform =='ios':\n\tsys.stdin=open('Untitled.txt')\ninput = sys.stdin.readline\ndef INT(): return int(input())\ndef MAP(): return [int(s) for s in input().split()]\n\nN = INT()\nH = MAP()\n\nmax = 0\nfor h in H:\n\tif h>= max:\n\t\tmax=h\n\tif h<= max-1:\n\t\tprint('No')\n\t\tsys.exit()\nprint('...
['Wrong Answer', 'Accepted']
['s934601962', 's861181810']
[14188.0, 14188.0]
[63.0, 58.0]
[296, 327]
p02953
u846652026
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...
['cnt = int(input())\nlst = list(map(int, input().split()))\nans = "yes"\nmaxNum = max(lst)\nmaxIndex = lst.index(maxNum)\n\nfor i, val in enumerate(lst):\n if i == 0:\n continue\n if (val + 1) < maxNum and maxIndex < i:\n ans = "no"\n \n\n \n \nprint(ans)', 'N = int(input())\nH = list(map(int, input().s...
['Wrong Answer', 'Accepted']
['s843733602', 's441630103']
[14396.0, 14380.0]
[69.0, 77.0]
[254, 198]
p02953
u847497464
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() ]\n\nfor i in range(0,h-1):\n if h[i] > h[i+1]:\n h[i] = h[i]-1\n print(h) \n \nfor i in range(0,h-1):\n if h[j] > h[j+1]:\n print('No')\n exit()\n \nprint('Yes')", "# ABC 136 C\nn = int(input())\nh = [ int(_) for _ ...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s114571837', 's317652220', 's346972619', 's755038823', 's652481540']
[14396.0, 14252.0, 14396.0, 14396.0, 14396.0]
[45.0, 81.0, 46.0, 86.0, 86.0]
[251, 324, 309, 337, 325]
p02953
u854239812
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\ni = N\nwhile i > 0:\n if H[i-1] > H[i] + 1:\n print('No')\n break\n if H[i-1] == H[i] + 1:\n H[i-1] -= 1\n i -= 1\nprint('Yes')", "N = int(input())\nH = list(map(int, input().split()))\n\ni = N - 1\nwhile i > 0:\n if H[i-1] > H[i] + 1:\n print('No')\n...
['Runtime Error', 'Accepted']
['s520379098', 's370601287']
[11152.0, 14252.0]
[27.0, 99.0]
[179, 200]
p02953
u859897687
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=[[] for i in range(n)]\na[0]+=[h[0]]\nfor i in range(1,n):\n for j in range(len(a[i-1])):\n if h[i]-a[i-1][j]==0:\n if h[i] not in a[i]:\n a[i]+=[h[i]]\n if h[i]-a[i-1][j]==1:\n if h[i] not in a[i]:\n a[i]+=[h[i]]\n if h[i]-1 not ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s355101130', 's699485421', 's891521105']
[18760.0, 14228.0, 21928.0]
[186.0, 2104.0, 311.0]
[390, 257, 390]
p02953
u859987056
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 reversed(range(n)):\n if i == 0:\n print("Yes")\n elif H - H[i - 1] == -1:\n H[i - 1] -= 1\n elif H[i] - H[i - 1] < -1:\n print("No")\n break\n else:\n continue', 'n = int(input())\nH = list(map(int, input()...
['Runtime Error', 'Accepted']
['s296666335', 's039342656']
[15020.0, 14252.0]
[42.0, 81.0]
[260, 263]
p02953
u860002137
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())\nH = np.array(list(map(int, input().split())))\n\nans_1 = min(H[np.where(H==H.max())[0].min():]) > max(H)-2\n\ntmp = H[1:] - H[:-1]\n\nans_2 = all(tmp2 > -2)\n\nprint("Yes") if ans_1 & ans_2 else print("No")', 'import numpy as np\n\nN = int(input())\nH = np.array(list(map(int, inp...
['Runtime Error', 'Accepted']
['s730627562', 's451031436']
[23136.0, 23120.0]
[201.0, 208.0]
[234, 224]
p02953
u861038878
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: utf-8 -*-\n \nn = int(input())\nh = list(map(int, input().split()))\nm = h[0]\nr = 'Yes'\nfor i in range(n-1):\n if h[i] > m:\n m = h[i]\n if h[i+1] < m + 1:\n r = 'No'\n break\n \nprint(r)", "# -*- coding: utf-8 -*-\n\nn = int(input())\nh = input().split()\nh.reverse()\nfor i in...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s253536743', 's377949506', 's357416612']
[14396.0, 2940.0, 14396.0]
[73.0, 17.0, 73.0]
[214, 187, 242]
p02953
u861886710
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+1] - (H[i]-1) > 1:\n print("No")\n exit(0)\nprint("Yes")', 'N = int(input())\nH = list(map(int, input().split()))\n\nfor i in range(N-1):\n if H[i+1] - (H[i]-1) > 1:\n print("No")\n break\nprint("Y...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s439671619', 's711609911', 's636561024']
[14252.0, 14252.0, 14396.0]
[61.0, 65.0, 89.0]
[153, 151, 199]
p02953
u861962192
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() for i in range(2)]\nn = int(a[0])\nh = list(map(int, a[1].split()))\n\nstr = "Yes"\nc = 10**9\nfor i in range(n):\n if h[i] <= c:\n c = h[i]\n else:\n if (h[i]-1) == c:\n c = h[i]\n else:\n str = "No"\n\nprint(str)\n', 'import sys\nread = sys.stdin.buffer....
['Wrong Answer', 'Accepted']
['s719623462', 's899456481']
[15192.0, 12528.0]
[65.0, 64.0]
[262, 391]
p02953
u864213970
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 = [int(x) for x in input().split()]\n\nfor i in range(n-1, -1, -1):\n if hs[i-1] <= hs[i]:\n continue\n elif hs[i-1] - 1 <= hs[i]:\n hs[i-1] = hs[i-1] - 1\n continue\n else:\n print("No")\n break\nelse:\n print("Yes")\n', 'n = int(input())\nhs = [int(x) for x in input().split()...
['Wrong Answer', 'Accepted']
['s660771197', 's949110300']
[14252.0, 14396.0]
[77.0, 92.0]
[245, 213]
p02953
u865383026
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 = input().split()\nS = 0\n\nfor i in range(H.index(max(H))):\n if int(H[i]) - int(H[i + 1]) > 0:\n if int(H[i]) - int(H[i + 1]) > 1:\n print('No')\n exit()\n S.append(i)\nfor i in range(H.index(max(H)), N):\n if int(H[i]) - int(H[i + 1]) > 0:\n S += 1\n if int...
['Runtime Error', 'Runtime Error', 'Accepted']
['s114809171', 's819303841', 's537728541']
[12012.0, 11152.0, 11372.0]
[93.0, 157.0, 80.0]
[371, 301, 177]
p02953
u867826040
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()))\nx = h[-1]\nans = "Yes"\nfor i in reversed(range(n - 1)):\n print(h)\n hi = h[i]\n if hi <= x:\n pass\n else:\n if abs(x - hi) >= 2:\n ans = "No"\n else:\n h[i] -= 1\n x = hi\nprint(ans)\n', 'n = int(input(...
['Runtime Error', 'Accepted']
['s816074918', 's012737074']
[142624.0, 14396.0]
[1658.0, 74.0]
[284, 273]
p02953
u867848444
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()))\nmaxim=h[-1]\nh=h[::-1]\nfor i in range(n-1):\n if h[i]-maxim>=2:\n print('NO')\n exit()\n\n elif h[i+1]-h[i]==1:\n h[i+1]+=-1\n\n elif h[i]-maxim==1:\n h[i]+=-1\n elif h[i+1]-h[i]>=2:\n print('NO')\n exit()\n\nprin...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s720882287', 's776464395', 's958814994', 's417655753']
[14708.0, 15020.0, 14396.0, 14224.0]
[96.0, 75.0, 74.0, 75.0]
[308, 245, 209, 210]
p02953
u868628468
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())\nH.append(1000000001)\n\nmax = H[0]\nfor i in range(N):\n if max >= H[i+1] + 2:\n print('No')\n break\n if max < H[i+1]:\n max = H[i+1]\n \nelse:\n print('Yes')\n ", "N = int(input())\nH = list(map(int, input().split()))\nH.ap...
['Runtime Error', 'Accepted']
['s110259925', 's858565563']
[11152.0, 14252.0]
[26.0, 77.0]
[241, 247]
p02953
u870906509
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()))\nc =0\n\nfor i in range(n-1):\n if (h[i+1]-h[i] <= 1) and (h[i+2] >= h[i]):\n c += 1\n else:\n pass\nif c == 1:\n print('Yes')\nelse:\n print('No')", "n = int(input())\nh = list(map(int,input().split()))\nc = 0\n\nfor i in range(n-1):\n ...
['Runtime Error', 'Accepted']
['s671150732', 's594907845']
[15020.0, 14252.0]
[83.0, 78.0]
[214, 246]