結果

問題 No.2918 Divide Applicants Fairly
ユーザー 高橋ゆに高橋ゆに
提出日時 2024-09-23 18:20:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 492 bytes
コンパイル時間 227 ms
コンパイル使用メモリ 82,296 KB
実行使用メモリ 247,748 KB
最終ジャッジ日時 2024-10-07 11:32:49
合計ジャッジ時間 8,778 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 36 ms
52,904 KB
testcase_04 AC 40 ms
53,008 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 51 ms
62,304 KB
testcase_10 AC 37 ms
52,744 KB
testcase_11 AC 1,442 ms
168,688 KB
testcase_12 AC 47 ms
61,460 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 38 ms
53,360 KB
testcase_16 AC 38 ms
52,892 KB
testcase_17 WA -
testcase_18 AC 1,448 ms
171,372 KB
testcase_19 WA -
testcase_20 AC 673 ms
125,164 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 52 ms
63,024 KB
testcase_24 AC 39 ms
52,216 KB
testcase_25 TLE -
testcase_26 WA -
testcase_27 AC 331 ms
100,496 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 40 ms
52,764 KB
testcase_31 WA -
testcase_32 AC 38 ms
52,868 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 303 ms
100,096 KB
testcase_37 AC 129 ms
86,176 KB
testcase_38 AC 84 ms
71,280 KB
testcase_39 AC 38 ms
52,824 KB
testcase_40 AC 86 ms
71,964 KB
testcase_41 AC 130 ms
86,820 KB
testcase_42 AC 240 ms
97,372 KB
testcase_43 AC 467 ms
118,344 KB
testcase_44 AC 942 ms
153,580 KB
testcase_45 AC 1,782 ms
247,748 KB
testcase_46 AC 39 ms
52,120 KB
testcase_47 WA -
testcase_48 AC 52 ms
63,604 KB
testcase_49 AC 130 ms
87,684 KB
testcase_50 WA -
testcase_51 AC 52 ms
63,356 KB
testcase_52 AC 96 ms
74,356 KB
testcase_53 AC 56 ms
63,364 KB
testcase_54 AC 56 ms
64,572 KB
testcase_55 AC 63 ms
65,852 KB
testcase_56 AC 62 ms
66,232 KB
testcase_57 AC 330 ms
98,868 KB
testcase_58 AC 62 ms
65,976 KB
testcase_59 AC 65 ms
67,284 KB
testcase_60 WA -
testcase_61 AC 63 ms
66,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

if N > 25:
    print(0)
    exit()

rates = list(map(int, input().split()))
rate_sums = []
for comb in range(1, 1 << N):
    if comb.bit_count() != 13:
        continue
    
    rate_sum = 0
    for i in range(N):
        if (comb >> i) & 1: rate_sum += rates[i]
    rate_sums.append(rate_sum)
rate_sums.sort()

ans = 2 ** 30
for i in range(len(rate_sums) - 1):
    if ans > abs(rate_sums[i] - rate_sums[i + 1]):
        ans = abs(rate_sums[i] - rate_sums[i + 1])
print(ans)
0