좌표압축

박현주#00002026. 05. 31. AM 05:5713
arr = list(map(int,input().split())) sorted_arr = sorted(list(set(arr))) dic = {sorted_arr[i]:i for i in range(len(sorted_arr))} pressed_arr = [0]*len(arr) for i in range(len(arr)): pressed_arr[i] = dic[arr[i]] print(arr) print(dic) print(pressed_arr)

댓글 0

댓글 불러오는 중...

댓글을 작성하려면 로그인 해주세요.