結果
問題 | No.99 ジャンピング駒 |
ユーザー |
![]() |
提出日時 | 2016-06-11 15:50:49 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 45 ms / 5,000 ms |
コード長 | 302 bytes |
コンパイル時間 | 567 ms |
コンパイル使用メモリ | 54,232 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 12:52:44 |
合計ジャッジ時間 | 1,655 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include <iostream>using namespace std;int main(){int N;cin>>N;int X[N];int even=0,odd=0;for(int i=0;i<N;i++){cin>>X[i];if(X[i]%2==0)even++;else odd++;}int a=0;a=even-odd;if(a<0)a=a*(-1);cout<<a<<endl;return 0;}