Submission #41279055


Source Code Expand

input()
A=list(map(int,input().split()))
B=[]

for i in range(len(A)-1):
  if A[i]<=A[i+1]:
    B+=list(range(A[i],A[i+1]))
  elif A[i]>A[i+1]:
    B+=list(range(A[i],A[i+1],-1))

B.append(A[-1])
print(*B)

Submission Info

Submission Time
Task B - Fill the Gaps
User kyopro_friends
Language PyPy3 (7.3.0)
Score 200
Code Size 216 Byte
Status AC
Exec Time 77 ms
Memory 74612 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 10
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
random_01.txt AC 77 ms 72080 KiB
random_02.txt AC 64 ms 71008 KiB
random_03.txt AC 63 ms 71916 KiB
random_04.txt AC 62 ms 71640 KiB
random_05.txt AC 66 ms 71804 KiB
random_06.txt AC 69 ms 74612 KiB
random_07.txt AC 50 ms 61984 KiB
random_08.txt AC 51 ms 61552 KiB
sample_01.txt AC 46 ms 61676 KiB
sample_02.txt AC 44 ms 61872 KiB