結果
問題 | No.99 ジャンピング駒 |
ユーザー |
![]() |
提出日時 | 2024-08-21 12:07:10 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 92 ms / 5,000 ms |
コード長 | 247 bytes |
コンパイル時間 | 803 ms |
コンパイル使用メモリ | 82,436 KB |
実行使用メモリ | 93,848 KB |
最終ジャッジ日時 | 2024-08-21 12:07:16 |
合計ジャッジ時間 | 3,052 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
N = int(input())X = sorted(list(map(int, input().split())))stack = []for x in X:if stack:if (x + stack[-1]) % 2:stack.pop()else:stack.append(x)else:stack.append(x)print(len(stack))