結果
問題 | No.123 カードシャッフル |
ユーザー |
![]() |
提出日時 | 2019-12-20 23:59:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 60 ms / 5,000 ms |
コード長 | 439 bytes |
コンパイル時間 | 77 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 17,320 KB |
最終ジャッジ日時 | 2024-07-18 03:36:02 |
合計ジャッジ時間 | 1,163 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 10 |
ソースコード
import syssys.setrecursionlimit(10 ** 6)int1 = lambda x: int(x) - 1p2D = lambda x: print(*x, sep="\n")def MI(): return map(int, sys.stdin.readline().split())def LI(): return list(map(int, sys.stdin.readline().split()))def LLI(rows_number): return [LI() for _ in range(rows_number)]def main():n,m=MI()aa=LI()cc=list(range(n,0,-1))for a in aa:c=cc.pop(-a)cc.append(c)print(cc[-1])main()