結果
問題 | No.99 ジャンピング駒 |
ユーザー | motxx |
提出日時 | 2014-12-10 01:18:07 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 41 ms / 5,000 ms |
コード長 | 368 bytes |
コンパイル時間 | 1,309 ms |
コンパイル使用メモリ | 144,740 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-02 12:30:02 |
合計ジャッジ時間 | 2,341 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 41 ms
4,380 KB |
testcase_01 | AC | 40 ms
4,380 KB |
testcase_02 | AC | 41 ms
4,380 KB |
testcase_03 | AC | 41 ms
4,380 KB |
testcase_04 | AC | 41 ms
4,380 KB |
testcase_05 | AC | 41 ms
4,380 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; #define REP(i,a,b) for(int i=a;i<(int)b;i++) #define rep(i,n) REP(i,0,n) typedef long long ll; int main() { int N; cin >> N; int ans = 0; vector<int> v(N); rep(i, N) { ll x; cin >> x; x+=10000000000; ans += x%2; ans -= !(x%2); } cout << abs(ans) << endl; return 0; }