結果
問題 | No.1584 Stones around Circle Pond |
ユーザー | googol_S0 |
提出日時 | 2021-07-02 22:50:41 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 881 bytes |
コンパイル時間 | 417 ms |
コンパイル使用メモリ | 86,896 KB |
実行使用メモリ | 82,612 KB |
最終ジャッジ日時 | 2023-09-11 23:15:44 |
合計ジャッジ時間 | 11,859 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 76 ms
71,168 KB |
testcase_01 | AC | 75 ms
71,476 KB |
testcase_02 | AC | 78 ms
71,444 KB |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | WA | - |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | WA | - |
testcase_17 | RE | - |
testcase_18 | RE | - |
testcase_19 | RE | - |
testcase_20 | RE | - |
testcase_21 | RE | - |
testcase_22 | RE | - |
testcase_23 | AC | 84 ms
76,316 KB |
testcase_24 | AC | 84 ms
76,012 KB |
testcase_25 | AC | 85 ms
76,228 KB |
testcase_26 | AC | 78 ms
71,376 KB |
testcase_27 | AC | 87 ms
76,252 KB |
testcase_28 | AC | 84 ms
76,028 KB |
testcase_29 | AC | 77 ms
71,408 KB |
testcase_30 | AC | 83 ms
76,300 KB |
testcase_31 | AC | 87 ms
76,060 KB |
testcase_32 | AC | 85 ms
76,192 KB |
testcase_33 | AC | 86 ms
76,428 KB |
testcase_34 | AC | 85 ms
76,164 KB |
testcase_35 | AC | 82 ms
76,328 KB |
testcase_36 | AC | 83 ms
76,228 KB |
testcase_37 | AC | 83 ms
76,384 KB |
testcase_38 | RE | - |
testcase_39 | RE | - |
testcase_40 | RE | - |
testcase_41 | RE | - |
testcase_42 | RE | - |
testcase_43 | RE | - |
testcase_44 | RE | - |
testcase_45 | RE | - |
testcase_46 | AC | 83 ms
76,252 KB |
testcase_47 | WA | - |
testcase_48 | AC | 84 ms
76,264 KB |
testcase_49 | AC | 84 ms
76,180 KB |
testcase_50 | AC | 83 ms
76,172 KB |
testcase_51 | RE | - |
testcase_52 | RE | - |
testcase_53 | RE | - |
testcase_54 | RE | - |
testcase_55 | RE | - |
testcase_56 | RE | - |
testcase_57 | RE | - |
testcase_58 | RE | - |
testcase_59 | RE | - |
testcase_60 | RE | - |
ソースコード
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+1) for i in range(N*2)] for i in range(N*2): for j in range(N*2): X[j][i]=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 W=[X[i][:] for i in range(N*2)] for i in range(N*2): B[i]-=X[0][i]*Z X[i][N*2]=B[i] for i in range(1,N*2): for j in range(N*2): X[j][i]-=X[j][0] for i in range(N*2): X[0][i]=1 X[0][N*2]=0 p=0 for k in range(N*2): p=X[k][k] for j in range(k,N*2+1): X[k][j]//=p for i in range(N*2): if i!=k: t=X[i][k] for j in range(k,N*2+1): X[i][j]=X[i][j]-t*X[k][j] Y=[max(X[i][N*2],0) for i in range(N*2)] Y[0]-=Z for i in range(N*2): for j in range(N*2): B[j]-=Y[i]*W[j][i] print('Yes' if min(B)==max(B)==0 else 'No')