結果

問題 No.2029 Swap Min Max Min
ユーザー first_vilfirst_vil
提出日時 2022-08-05 21:38:32
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 626 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 111,868 KB
最終ジャッジ日時 2023-10-14 00:05:17
合計ジャッジ時間 7,541 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,288 KB
testcase_01 AC 75 ms
71,132 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 100 ms
87,972 KB
testcase_06 AC 121 ms
101,596 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 92 ms
80,932 KB
testcase_11 WA -
testcase_12 AC 105 ms
91,056 KB
testcase_13 WA -
testcase_14 AC 144 ms
111,132 KB
testcase_15 WA -
testcase_16 AC 145 ms
111,116 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 143 ms
111,128 KB
testcase_20 AC 144 ms
111,144 KB
testcase_21 AC 145 ms
111,232 KB
testcase_22 AC 144 ms
111,116 KB
testcase_23 WA -
testcase_24 AC 139 ms
111,456 KB
testcase_25 AC 139 ms
111,592 KB
testcase_26 AC 140 ms
111,532 KB
testcase_27 WA -
testcase_28 AC 78 ms
71,148 KB
testcase_29 AC 75 ms
71,288 KB
testcase_30 AC 77 ms
71,108 KB
testcase_31 AC 78 ms
70,976 KB
testcase_32 WA -
testcase_33 AC 76 ms
71,296 KB
testcase_34 WA -
testcase_35 AC 75 ms
70,980 KB
testcase_36 AC 76 ms
71,092 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 142 ms
111,264 KB
testcase_40 AC 126 ms
103,096 KB
testcase_41 AC 135 ms
107,572 KB
testcase_42 AC 134 ms
107,576 KB
testcase_43 AC 139 ms
110,840 KB
testcase_44 AC 140 ms
111,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from heapq import heapify, heappop, heappush
import sys

int1 = lambda x: int(x) - 1

# input = lambda: sys.stdin.buffer.readline()
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
i1 = lambda: int1(input())
mi = lambda: map(int, input().split())
mi1 = lambda: map(int1, input().split())
li = lambda: list(mi())
li1 = lambda: list(mi1())
lli = lambda n: [li() for _ in range(n)]

INF = float("inf")
mod = int(1e9 + 7)
# mod = 998244353

n = ii()
a = li()

b = [i for i in range(n) if a[i] <= n // 2]
b.sort()
c = [2 * i + 1 for i in range(n // 2)]
print(n // 2, sum([abs(x - y) for x, y in zip(b, c)]))
0