結果

問題 No.365 ジェンガソート
ユーザー buey_tbuey_t
提出日時 2023-03-29 09:45:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,197 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 81,716 KB
実行使用メモリ 103,188 KB
最終ジャッジ日時 2023-10-21 02:34:41
合計ジャッジ時間 7,207 ms
ジャッジサーバーID
(参考情報)
judge13 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
84,468 KB
testcase_01 AC 116 ms
84,472 KB
testcase_02 AC 118 ms
84,468 KB
testcase_03 AC 114 ms
84,464 KB
testcase_04 AC 115 ms
84,476 KB
testcase_05 AC 115 ms
84,468 KB
testcase_06 AC 122 ms
84,480 KB
testcase_07 AC 117 ms
84,476 KB
testcase_08 AC 116 ms
84,468 KB
testcase_09 AC 115 ms
84,480 KB
testcase_10 WA -
testcase_11 AC 114 ms
84,476 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 111 ms
84,472 KB
testcase_15 AC 123 ms
84,472 KB
testcase_16 AC 143 ms
99,488 KB
testcase_17 AC 154 ms
102,940 KB
testcase_18 AC 133 ms
89,228 KB
testcase_19 AC 144 ms
102,916 KB
testcase_20 AC 134 ms
91,388 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 147 ms
103,184 KB
testcase_37 AC 150 ms
103,184 KB
testcase_38 WA -
testcase_39 AC 146 ms
103,180 KB
testcase_40 AC 155 ms
103,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    from math import sqrt,sin,cos,tan,ceil,radians,floor,gcd,exp,log,log10,log2,factorial,fsum
    from heapq import heapify, heappop, heappush
    from bisect import bisect_left, bisect_right
    from copy import deepcopy
    import copy
    import random
    from collections import deque,Counter,defaultdict
    from itertools import permutations,combinations
    from decimal import Decimal,ROUND_HALF_UP
    #tmp = Decimal(mid).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
    from functools import lru_cache, reduce
    #@lru_cache(maxsize=None)
    from operator import add,sub,mul,xor,and_,or_,itemgetter
    INF = 10**18
    mod1 = 10**9+7
    mod2 = 998244353
    
    #DecimalならPython
    #再帰ならPython!!!!!!!!!!!!!!!!!!!!!!!!!!
    
    
    '''
    
    
    
    '''
    
    N = int(input())
    A = list(map(int, input().split()))
    
    memo = [0]*(N+1)
    
    for i in range(N):
        memo[A[i]] = memo[A[i]-1]+1
    
    print(N-max(memo))
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
if __name__ == '__main__':
    main()
0