結果

問題 No.545 ママの大事な二人の子供
ユーザー kairiku
提出日時 2017-11-04 12:11:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 355 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,632 KB
最終ジャッジ日時 2024-11-23 05:41:37
合計ジャッジ時間 43,914 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19 TLE * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
sanple=int(input())
score=[]
for i in range(sanple):
 score.append(list(map(int,str(input()).split(" "))))
minscore=999**999
for i in range(2**sanple):
 sumscore=[0,0]
 for j in range(sanple):
  sumscore[i%2]+=score[j][i%2]
  i=math.floor(i/2)
 if abs(sumscore[1]-sumscore[0])<minscore:
  minscore=abs(sumscore[1]-sumscore[0])
print(minscore)
0