結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
|
提出日時 | 2020-09-14 21:18:47 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 15 ms / 5,000 ms |
コード長 | 332 bytes |
コンパイル時間 | 2,077 ms |
コンパイル使用メモリ | 192,296 KB |
最終ジャッジ日時 | 2025-01-14 14:50:47 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i, ss, ee) for (int i = ss; i < ee; ++i) void solve() { int N; int x, ans = 0; cin >> N; rep(i, 0, N) { cin >> x; (x & 1) ? ans++ : ans--; } cout << abs(ans) << endl; } int main() { ios::sync_with_stdio(false); cin.tie(0); solve(); getchar(); }