結果

問題 No.1584 Stones around Circle Pond
ユーザー googol_S0googol_S0
提出日時 2021-07-02 22:22:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 440 bytes
コンパイル時間 445 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 76,420 KB
最終ジャッジ日時 2023-09-11 22:28:32
合計ジャッジ時間 7,805 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,384 KB
testcase_01 AC 74 ms
71,472 KB
testcase_02 AC 75 ms
71,404 KB
testcase_03 AC 82 ms
76,312 KB
testcase_04 AC 82 ms
76,420 KB
testcase_05 AC 81 ms
75,908 KB
testcase_06 AC 73 ms
71,168 KB
testcase_07 AC 81 ms
76,088 KB
testcase_08 AC 81 ms
75,788 KB
testcase_09 AC 81 ms
76,004 KB
testcase_10 AC 81 ms
76,100 KB
testcase_11 AC 81 ms
76,036 KB
testcase_12 AC 82 ms
76,120 KB
testcase_13 AC 81 ms
75,956 KB
testcase_14 AC 82 ms
76,092 KB
testcase_15 AC 81 ms
75,956 KB
testcase_16 AC 74 ms
71,212 KB
testcase_17 AC 84 ms
75,952 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 80 ms
76,096 KB
testcase_24 AC 83 ms
75,980 KB
testcase_25 AC 81 ms
76,036 KB
testcase_26 AC 73 ms
71,096 KB
testcase_27 AC 84 ms
76,036 KB
testcase_28 AC 81 ms
75,796 KB
testcase_29 AC 74 ms
71,192 KB
testcase_30 AC 81 ms
76,156 KB
testcase_31 AC 80 ms
76,116 KB
testcase_32 AC 81 ms
76,084 KB
testcase_33 AC 80 ms
75,988 KB
testcase_34 AC 80 ms
76,032 KB
testcase_35 AC 80 ms
76,144 KB
testcase_36 AC 81 ms
76,004 KB
testcase_37 AC 80 ms
76,124 KB
testcase_38 AC 79 ms
75,968 KB
testcase_39 AC 81 ms
76,032 KB
testcase_40 AC 80 ms
75,960 KB
testcase_41 AC 80 ms
75,984 KB
testcase_42 AC 80 ms
75,996 KB
testcase_43 AC 73 ms
71,076 KB
testcase_44 AC 81 ms
76,172 KB
testcase_45 AC 78 ms
76,032 KB
testcase_46 AC 80 ms
75,784 KB
testcase_47 AC 84 ms
76,112 KB
testcase_48 AC 79 ms
75,992 KB
testcase_49 AC 78 ms
75,956 KB
testcase_50 AC 79 ms
75,984 KB
testcase_51 AC 80 ms
76,100 KB
testcase_52 AC 79 ms
75,992 KB
testcase_53 AC 80 ms
76,120 KB
testcase_54 AC 80 ms
76,156 KB
testcase_55 AC 71 ms
71,272 KB
testcase_56 AC 80 ms
75,960 KB
testcase_57 AC 79 ms
76,184 KB
testcase_58 AC 80 ms
76,104 KB
testcase_59 AC 80 ms
75,792 KB
testcase_60 AC 80 ms
76,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,L=map(int,input().split())
D=list(map(int,input().split()))
B=list(map(int,input().split()))
for i in range(N):
  D.append(D[i]+L)
X=[[0]*(N*2) for i in range(N*2)]
for i in range(N*2):
  for j in range(N*2):
    X[i][j]=min((D[i]-D[j])%(2*L),(D[j]-D[i])%(2*L))
U=sum(B)
V=sum(X[0])
if U%V:
  print('No')
  exit()
Z=U//V
for i in range(N*2):
  B[i]-=X[0][i]*Z
if max([B[i]+B[i+N] for i in range(N)])==0:
  print('Yes')
else:
  print('No')
0