結果
| 問題 |
No.99 ジャンピング駒
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-10 08:38:51 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 18 ms / 5,000 ms |
| コード長 | 336 bytes |
| コンパイル時間 | 936 ms |
| コンパイル使用メモリ | 92,304 KB |
| 最終ジャッジ日時 | 2025-01-11 00:43:40 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
using namespace std;
typedef long long int ll;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n; cin >> n;
int m=0,l=0;
while(n--){
int x; cin >> x;
if(x%2)m++;
else l++;
}
printf("%d\n",abs(l-m));
}