結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
|
提出日時 | 2020-12-16 13:48:09 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 253 bytes |
コンパイル時間 | 1,670 ms |
コンパイル使用メモリ | 166,400 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-20 04:58:50 |
合計ジャッジ時間 | 2,519 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int64_t N; cin >> N; int64_t ans = 0; for (int i = 0; i < N; i++) { int64_t x; cin >> x; if (x & 1) ans++; else x--; } cout << max(ans, -ans) << endl; return 0; }