結果
| 問題 |
No.99 ジャンピング駒
|
| コンテスト | |
| ユーザー |
173205080
|
| 提出日時 | 2019-07-12 09:13:22 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 5,000 ms |
| コード長 | 323 bytes |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 29,184 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 00:19:24 |
| 合計ジャッジ時間 | 816 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
ソースコード
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define df 0
#define dist(a,b) (a<b?b-a:a-b)
int main(){
int n;
scanf("%d",&n);
int i,s[2]={};
for(i=0;i<n;i++){
long int a;
scanf("%ld",&a);
if(a%2)s[1]++; else s[0]++;
}
printf("%d",dist(s[0],s[1]));
return 0;
}
/// confirm df==0 ///
173205080