結果

問題 No.2542 Yokan for Two
ユーザー 👑 p-adicp-adic
提出日時 2023-08-10 19:16:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 220 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 46,052 KB
最終ジャッジ日時 2024-04-28 12:37:05
合計ジャッジ時間 34,189 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,752 KB
testcase_01 AC 27 ms
10,624 KB
testcase_02 AC 26 ms
10,624 KB
testcase_03 AC 341 ms
46,052 KB
testcase_04 AC 484 ms
22,408 KB
testcase_05 AC 1,140 ms
45,420 KB
testcase_06 AC 26 ms
10,880 KB
testcase_07 TLE -
testcase_08 AC 453 ms
28,636 KB
testcase_09 AC 1,919 ms
45,616 KB
testcase_10 AC 230 ms
22,336 KB
testcase_11 AC 346 ms
22,408 KB
testcase_12 AC 914 ms
45,360 KB
testcase_13 AC 194 ms
15,096 KB
testcase_14 AC 909 ms
27,372 KB
testcase_15 AC 1,169 ms
27,308 KB
testcase_16 AC 1,175 ms
27,412 KB
testcase_17 AC 1,038 ms
23,204 KB
testcase_18 AC 1,110 ms
27,400 KB
testcase_19 AC 597 ms
22,272 KB
testcase_20 AC 450 ms
15,080 KB
testcase_21 AC 487 ms
15,088 KB
testcase_22 AC 485 ms
22,420 KB
testcase_23 AC 571 ms
22,544 KB
testcase_24 AC 25 ms
10,752 KB
testcase_25 AC 27 ms
11,008 KB
testcase_26 AC 27 ms
10,752 KB
testcase_27 AC 28 ms
11,136 KB
testcase_28 AC 29 ms
11,648 KB
testcase_29 AC 410 ms
45,920 KB
testcase_30 AC 907 ms
24,196 KB
testcase_31 AC 961 ms
24,100 KB
testcase_32 AC 933 ms
24,068 KB
testcase_33 AC 1,036 ms
30,712 KB
testcase_34 AC 1,113 ms
30,864 KB
testcase_35 AC 1,206 ms
31,224 KB
testcase_36 AC 1,164 ms
30,812 KB
testcase_37 AC 1,296 ms
31,340 KB
testcase_38 AC 1,129 ms
31,204 KB
testcase_39 AC 1,238 ms
27,448 KB
testcase_40 AC 1,229 ms
27,448 KB
testcase_41 AC 1,135 ms
27,220 KB
testcase_42 AC 1,172 ms
27,472 KB
testcase_43 AC 1,215 ms
27,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def J():
	return map(int,input().split())
L,N=J()
X=list(J())+[L]
E=set()
F={0}
O={X[0]}
for i in range(1,N+1):
	G=set()
	for x in O:E.add(x),G.add(x-X[i])
	for x in F:O.add(x+X[i])
	F|=G
print(min(abs(x*2-L)for x in E))
0