結果

問題 No.2261 Coffee
ユーザー 👑 timitimi
提出日時 2024-02-18 16:22:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 481 ms / 2,000 ms
コード長 832 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 132,928 KB
最終ジャッジ日時 2024-02-18 16:22:17
合計ジャッジ時間 13,926 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,460 KB
testcase_01 AC 35 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 35 ms
53,460 KB
testcase_04 AC 35 ms
53,460 KB
testcase_05 AC 35 ms
53,460 KB
testcase_06 AC 35 ms
53,460 KB
testcase_07 AC 34 ms
53,460 KB
testcase_08 AC 35 ms
53,460 KB
testcase_09 AC 35 ms
53,460 KB
testcase_10 AC 50 ms
64,332 KB
testcase_11 AC 53 ms
64,320 KB
testcase_12 AC 51 ms
64,352 KB
testcase_13 AC 52 ms
64,352 KB
testcase_14 AC 53 ms
64,332 KB
testcase_15 AC 51 ms
62,256 KB
testcase_16 AC 51 ms
64,352 KB
testcase_17 AC 85 ms
77,848 KB
testcase_18 AC 84 ms
77,712 KB
testcase_19 AC 85 ms
77,712 KB
testcase_20 AC 85 ms
77,588 KB
testcase_21 AC 87 ms
77,840 KB
testcase_22 AC 84 ms
77,584 KB
testcase_23 AC 83 ms
77,840 KB
testcase_24 AC 481 ms
128,252 KB
testcase_25 AC 357 ms
119,884 KB
testcase_26 AC 446 ms
131,684 KB
testcase_27 AC 405 ms
127,972 KB
testcase_28 AC 403 ms
123,204 KB
testcase_29 AC 334 ms
122,128 KB
testcase_30 AC 283 ms
111,620 KB
testcase_31 AC 409 ms
132,900 KB
testcase_32 AC 467 ms
132,608 KB
testcase_33 AC 408 ms
132,908 KB
testcase_34 AC 426 ms
132,784 KB
testcase_35 AC 389 ms
132,848 KB
testcase_36 AC 437 ms
132,896 KB
testcase_37 AC 423 ms
132,928 KB
testcase_38 AC 445 ms
131,888 KB
testcase_39 AC 430 ms
131,892 KB
testcase_40 AC 458 ms
131,896 KB
testcase_41 AC 458 ms
131,912 KB
testcase_42 AC 432 ms
131,976 KB
testcase_43 AC 435 ms
131,984 KB
testcase_44 AC 477 ms
131,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#N,L,R=map(int, input().split())
#A=list(map(int, input().split()))
N=int(input())
C=[];D={}
for j in range(2**5):
  B=[];D[j]=[]
  for k in range(5):
    if j%2==1:
      B.append(1)
    else:
      B.append(-1)
    j//=2 
  C.append(B)
  
from itertools import product
C= list(product([-1,1], repeat=5))
A=[];T=[[]for i in range(N)];D=[[]for i in range(32)]
for i in range(N):
  a,b,c,d,e=map(int, input().split())
  A.append((a,b,c,d,e))
  for now in range(32):
    x,y,z,w,v=C[now]
    cc=a*x+b*y+c*z+d*w+e*v
    T[i].append(cc)
    if i==0:
      D[now].append(cc)
      D[now].append(cc)
    else:
      D[now][0]=max(D[now][0],cc)
      D[now][1]=min(D[now][1],cc)
      
for i in range(N):
  ans=[]
  for j in range(32):
    d=abs(D[j][0]-T[i][j]);e=abs(D[j][1]-T[i][j])
    ans.append(d)
    ans.append(e)
  print(max(ans))
0