結果
問題 | No.99 ジャンピング駒 |
ユーザー |
![]() |
提出日時 | 2019-03-20 15:44:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 15 ms / 5,000 ms |
コード長 | 220 bytes |
コンパイル時間 | 190 ms |
コンパイル使用メモリ | 30,976 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 00:42:17 |
合計ジャッジ時間 | 787 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
#include <stdio.h>int main() {int n,x;int a=0,b=0;scanf("%d\n",&n);for (int i=0;i<n;i++){scanf("%d",&x);if (x%2==0) a++;else b++;}printf("%d\n",(a>b)?a-b:b-a);}