結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
![]() |
提出日時 | 2019-07-12 09:09:24 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 305 bytes |
コンパイル時間 | 122 ms |
コンパイル使用メモリ | 28,544 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 00:08:17 |
合計ジャッジ時間 | 1,409 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 5 |
ソースコード
#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); s[a%2]++; } printf("%d",dist(s[0],s[1])); return 0; } /// confirm df==0 ///