結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
30,692 KB
testcase_01 AC 137 ms
30,412 KB
testcase_02 AC 136 ms
30,704 KB
testcase_03 AC 149 ms
30,944 KB
testcase_04 AC 138 ms
30,720 KB
testcase_05 AC 153 ms
30,760 KB
testcase_06 AC 135 ms
30,556 KB
testcase_07 AC 181 ms
33,776 KB
testcase_08 AC 149 ms
30,968 KB
testcase_09 AC 158 ms
30,660 KB
testcase_10 AC 140 ms
30,620 KB
testcase_11 AC 175 ms
31,244 KB
testcase_12 AC 172 ms
31,496 KB
testcase_13 AC 141 ms
30,740 KB
testcase_14 AC 153 ms
31,016 KB
testcase_15 AC 178 ms
31,252 KB
testcase_16 AC 133 ms
30,404 KB
testcase_17 AC 170 ms
31,276 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 138 ms
30,440 KB
testcase_24 AC 182 ms
33,736 KB
testcase_25 AC 151 ms
30,856 KB
testcase_26 AC 138 ms
30,300 KB
testcase_27 AC 158 ms
30,616 KB
testcase_28 AC 148 ms
30,608 KB
testcase_29 AC 136 ms
30,372 KB
testcase_30 AC 141 ms
30,612 KB
testcase_31 AC 183 ms
31,996 KB
testcase_32 AC 187 ms
32,144 KB
testcase_33 AC 170 ms
31,508 KB
testcase_34 AC 161 ms
30,960 KB
testcase_35 AC 173 ms
31,472 KB
testcase_36 AC 168 ms
30,856 KB
testcase_37 AC 150 ms
30,880 KB
testcase_38 AC 174 ms
31,432 KB
testcase_39 AC 162 ms
30,828 KB
testcase_40 AC 143 ms
30,740 KB
testcase_41 AC 164 ms
33,016 KB
testcase_42 AC 158 ms
31,324 KB
testcase_43 AC 134 ms
30,372 KB
testcase_44 AC 187 ms
32,064 KB
testcase_45 AC 149 ms
30,896 KB
testcase_46 AC 146 ms
30,840 KB
testcase_47 AC 150 ms
30,804 KB
testcase_48 AC 156 ms
30,868 KB
testcase_49 AC 140 ms
30,516 KB
testcase_50 AC 147 ms
30,880 KB
testcase_51 AC 146 ms
30,948 KB
testcase_52 AC 140 ms
30,752 KB
testcase_53 AC 182 ms
31,496 KB
testcase_54 AC 146 ms
30,876 KB
testcase_55 AC 137 ms
30,340 KB
testcase_56 AC 143 ms
30,788 KB
testcase_57 AC 166 ms
31,120 KB
testcase_58 AC 157 ms
30,716 KB
testcase_59 AC 145 ms
30,628 KB
testcase_60 AC 159 ms
30,988 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), dtype='int64')

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), dtype='int64')
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