結果

問題 No.99 ジャンピング駒
コンテスト
ユーザー scache
提出日時 2014-12-09 23:44:02
言語 Java
(openjdk 25.0.2)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
WA  
実行時間 -
コード長 414 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,880 ms
コンパイル使用メモリ 82,232 KB
実行使用メモリ 58,140 KB
最終ジャッジ日時 2026-03-05 00:59:37
合計ジャッジ時間 7,782 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import java.util.Scanner;

public class Main99 {
	public static void main(String[] args) {
		Main99 p = new Main99();
	}

	public Main99() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] s = new int[2];
		for (int i = 0; i < n; i++)
			s[Math.abs(sc.nextInt())%2] += 1;
		
		System.out.println(s[0]==s[1] ? 0 : Math.max(s[0], s[1])-Math.min(s[0], s[1])*2);
		
	}


}
0