結果
問題 | No.99 ジャンピング駒 |
ユーザー |
![]() |
提出日時 | 2016-02-19 11:47:23 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 23 ms / 5,000 ms |
コード長 | 337 bytes |
コンパイル時間 | 685 ms |
コンパイル使用メモリ | 104,208 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 02:56:45 |
合計ジャッジ時間 | 1,337 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
import std.stdio, std.conv, std.string, std.range, std.math, std.algorithm; void main() { auto N = readln.strip.to!int; auto X = readln.split.to!(long[]); auto evens = X.count!"abs(a)%2 == 0"; auto odds = X.count!"abs(a)%2 == 1"; (max(evens, odds) - min(evens, odds)).writeln; }