結果

問題 No.123 カードシャッフル
ユーザー convexineqconvexineq
提出日時 2020-12-08 02:36:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 145 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 81,880 KB
実行使用メモリ 84,280 KB
最終ジャッジ日時 2023-10-17 16:53:10
合計ジャッジ時間 1,468 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,520 KB
testcase_01 AC 38 ms
53,520 KB
testcase_02 AC 36 ms
53,520 KB
testcase_03 AC 35 ms
53,520 KB
testcase_04 AC 35 ms
53,520 KB
testcase_05 AC 35 ms
53,520 KB
testcase_06 WA -
testcase_07 AC 35 ms
53,520 KB
testcase_08 AC 35 ms
53,520 KB
testcase_09 AC 36 ms
53,520 KB
testcase_10 AC 61 ms
81,768 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
*a, = map(int,input().split())
v = 0
for ai in a[::-1]:
    if v==0: v = ai-1
    elif v < ai-1: v -= 1
print(v+1)
0