結果

問題 No.99 ジャンピング駒
ユーザー pofpof
提出日時 2019-07-07 15:10:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 202 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,636 KB
最終ジャッジ日時 2024-04-15 05:19:29
合計ジャッジ時間 1,406 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
21,636 KB
testcase_01 AC 113 ms
21,632 KB
testcase_02 AC 118 ms
21,636 KB
testcase_03 AC 119 ms
21,508 KB
testcase_04 AC 122 ms
21,504 KB
testcase_05 AC 118 ms
21,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
x = map(int,input().split())

a=list()
for e in sorted(x):
    if len(a)==0:
        a.append(e)
    elif (a[-1] - e) %2 ==1:
        a.pop()
    else:
        a.append(e)
print(len(a))
0