結果

問題 No.1584 Stones around Circle Pond
ユーザー startcppstartcpp
提出日時 2021-07-02 23:09:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 609 bytes
コンパイル時間 121 ms
コンパイル使用メモリ 10,808 KB
実行使用メモリ 33,284 KB
最終ジャッジ日時 2023-09-11 23:37:30
合計ジャッジ時間 12,562 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
30,312 KB
testcase_01 AC 135 ms
30,492 KB
testcase_02 AC 134 ms
30,464 KB
testcase_03 AC 151 ms
30,932 KB
testcase_04 AC 142 ms
30,476 KB
testcase_05 AC 155 ms
30,956 KB
testcase_06 AC 142 ms
30,704 KB
testcase_07 AC 182 ms
33,008 KB
testcase_08 AC 148 ms
30,672 KB
testcase_09 AC 156 ms
30,672 KB
testcase_10 AC 138 ms
30,696 KB
testcase_11 AC 173 ms
32,980 KB
testcase_12 AC 171 ms
31,244 KB
testcase_13 AC 139 ms
30,408 KB
testcase_14 AC 153 ms
30,616 KB
testcase_15 AC 173 ms
32,780 KB
testcase_16 AC 134 ms
30,612 KB
testcase_17 AC 172 ms
30,928 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 141 ms
30,624 KB
testcase_24 AC 178 ms
30,940 KB
testcase_25 AC 150 ms
30,720 KB
testcase_26 AC 136 ms
30,676 KB
testcase_27 AC 155 ms
30,704 KB
testcase_28 AC 145 ms
30,796 KB
testcase_29 AC 135 ms
30,712 KB
testcase_30 AC 140 ms
30,680 KB
testcase_31 AC 183 ms
31,528 KB
testcase_32 AC 184 ms
31,016 KB
testcase_33 AC 170 ms
30,772 KB
testcase_34 AC 156 ms
31,308 KB
testcase_35 AC 171 ms
32,864 KB
testcase_36 AC 165 ms
31,368 KB
testcase_37 AC 152 ms
30,840 KB
testcase_38 AC 172 ms
30,988 KB
testcase_39 AC 165 ms
31,012 KB
testcase_40 AC 144 ms
30,832 KB
testcase_41 AC 166 ms
32,820 KB
testcase_42 AC 160 ms
31,480 KB
testcase_43 AC 135 ms
30,344 KB
testcase_44 AC 181 ms
31,268 KB
testcase_45 AC 149 ms
30,892 KB
testcase_46 AC 142 ms
30,636 KB
testcase_47 AC 147 ms
30,612 KB
testcase_48 AC 151 ms
30,752 KB
testcase_49 AC 138 ms
30,500 KB
testcase_50 AC 143 ms
30,608 KB
testcase_51 AC 142 ms
30,856 KB
testcase_52 AC 137 ms
30,812 KB
testcase_53 AC 179 ms
31,028 KB
testcase_54 AC 145 ms
30,740 KB
testcase_55 AC 137 ms
30,524 KB
testcase_56 AC 142 ms
30,568 KB
testcase_57 AC 162 ms
30,736 KB
testcase_58 AC 154 ms
30,800 KB
testcase_59 AC 141 ms
30,772 KB
testcase_60 AC 157 ms
31,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

n, l = map(int, input().split())
d = list(map(int, input().split()))
D = []

for e in d:
	D.append(e)

for e in d:
	D.append(l + e)

b = list(map(int, input().split()))
A = np.zeros((2 * n, 2 * n))

for i in range(2 * n):
	for j in range(i):
		if i - j <= n:
			A[i][j] = D[i] - D[j]
		else:
			A[i][j] = 2 * l - (D[i] - D[j])
		A[j][i] = A[i][j]

C = np.zeros((2 * n, 2 * n + 1))
for i in range(2 * n):
	for j in range(2 * n):
		C[i][j] = A[i][j]
	C[i][2 * n] = b[i]

rankA = np.linalg.matrix_rank(A)
rankAb = np.linalg.matrix_rank(C)

if rankA == rankAb:
	print('Yes')
else:
	print('No')
0