結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
|
提出日時 | 2016-09-24 13:25:02 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 347 bytes |
コンパイル時間 | 132 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 14,996 KB |
最終ジャッジ日時 | 2024-11-17 20:36:22 |
合計ジャッジ時間 | 1,272 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 6 |
ソースコード
N = int(raw_input()) arr = map(int, raw_input().split()) arr.sort() ### sub def subcheck(i): if len(arr) == i + 1: print len(arr) exit() if arr[i+1] % 2 == arr[i+2] % 2: sub(i+1) else: arr.pop(i+1) arr.pop(i+1) ### main while len(arr) >= 2: if arr[0] % 2 == arr[1] % 2: subcheck(0) else: arr.pop(0) arr.pop(0) print len(arr)