結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,460 KB
testcase_01 AC 32 ms
53,460 KB
testcase_02 AC 31 ms
53,460 KB
testcase_03 AC 30 ms
53,460 KB
testcase_04 AC 33 ms
53,460 KB
testcase_05 AC 34 ms
53,460 KB
testcase_06 AC 34 ms
53,460 KB
testcase_07 AC 33 ms
53,460 KB
testcase_08 AC 33 ms
53,460 KB
testcase_09 AC 33 ms
53,460 KB
testcase_10 AC 48 ms
64,328 KB
testcase_11 AC 47 ms
64,308 KB
testcase_12 AC 45 ms
64,340 KB
testcase_13 AC 43 ms
64,340 KB
testcase_14 AC 49 ms
64,328 KB
testcase_15 AC 42 ms
62,248 KB
testcase_16 AC 43 ms
64,340 KB
testcase_17 AC 92 ms
77,712 KB
testcase_18 AC 75 ms
77,572 KB
testcase_19 AC 73 ms
77,572 KB
testcase_20 AC 81 ms
77,452 KB
testcase_21 AC 74 ms
77,572 KB
testcase_22 AC 72 ms
77,444 KB
testcase_23 AC 73 ms
77,700 KB
testcase_24 AC 372 ms
128,072 KB
testcase_25 AC 325 ms
119,740 KB
testcase_26 AC 417 ms
131,540 KB
testcase_27 AC 373 ms
127,840 KB
testcase_28 AC 308 ms
123,116 KB
testcase_29 AC 328 ms
121,960 KB
testcase_30 AC 259 ms
111,480 KB
testcase_31 AC 367 ms
132,776 KB
testcase_32 AC 392 ms
132,848 KB
testcase_33 AC 360 ms
132,784 KB
testcase_34 AC 365 ms
132,756 KB
testcase_35 AC 393 ms
132,876 KB
testcase_36 AC 379 ms
132,828 KB
testcase_37 AC 357 ms
132,796 KB
testcase_38 AC 417 ms
131,740 KB
testcase_39 AC 414 ms
131,744 KB
testcase_40 AC 395 ms
131,748 KB
testcase_41 AC 419 ms
131,680 KB
testcase_42 AC 396 ms
131,836 KB
testcase_43 AC 388 ms
131,712 KB
testcase_44 AC 421 ms
131,828 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)
  
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