結果

問題 No.99 ジャンピング駒
ユーザー umaumax
提出日時 2017-05-03 10:01:15
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 263 bytes
コンパイル時間 551 ms
コンパイル使用メモリ 62,112 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-14 07:01:12
合計ジャッジ時間 1,913 ms
ジャッジサーバーID
(参考情報)
judge5 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cmath>
#include <iostream>

using namespace std;

int main(int argc, const char* argv[])
{
	int N;
	cin >> N;
	int X[N];
	for (auto&& x : X) cin >> x;
	int v[2] = {0};
	for (auto&& x : X) v[x % 2 == 0]++;
	cout << abs(v[0] - v[1]) << endl;
	return 0;
}
0