結果
問題 | No.2632 Center of Three Points in Lp Norm |
ユーザー | NyaanNyaan |
提出日時 | 2024-02-16 23:02:12 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 551 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 11,904 KB |
実行使用メモリ | 127,420 KB |
最終ジャッジ日時 | 2024-02-16 23:03:11 |
合計ジャッジ時間 | 48,528 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | AC | 1,137 ms
66,872 KB |
testcase_02 | AC | 1,152 ms
66,848 KB |
testcase_03 | WA | - |
testcase_04 | AC | 1,117 ms
66,812 KB |
testcase_05 | WA | - |
testcase_06 | AC | 1,057 ms
66,856 KB |
testcase_07 | AC | 1,141 ms
66,812 KB |
testcase_08 | AC | 1,076 ms
66,860 KB |
testcase_09 | AC | 1,091 ms
66,856 KB |
testcase_10 | AC | 1,062 ms
66,812 KB |
testcase_11 | WA | - |
testcase_12 | AC | 1,105 ms
66,884 KB |
testcase_13 | AC | 1,135 ms
66,840 KB |
testcase_14 | AC | 1,100 ms
66,804 KB |
testcase_15 | AC | 1,055 ms
66,856 KB |
testcase_16 | AC | 1,075 ms
66,884 KB |
testcase_17 | AC | 1,114 ms
66,916 KB |
testcase_18 | WA | - |
testcase_19 | AC | 1,070 ms
66,904 KB |
testcase_20 | AC | 1,064 ms
66,884 KB |
testcase_21 | AC | 1,081 ms
66,812 KB |
testcase_22 | WA | - |
testcase_23 | AC | 1,025 ms
66,884 KB |
testcase_24 | AC | 1,034 ms
66,856 KB |
testcase_25 | AC | 1,088 ms
66,916 KB |
testcase_26 | AC | 1,143 ms
66,856 KB |
testcase_27 | WA | - |
testcase_28 | AC | 1,062 ms
66,884 KB |
testcase_29 | AC | 1,056 ms
66,812 KB |
testcase_30 | AC | 1,099 ms
66,828 KB |
testcase_31 | WA | - |
testcase_32 | AC | 1,055 ms
66,916 KB |
testcase_33 | WA | - |
testcase_34 | AC | 1,086 ms
66,884 KB |
testcase_35 | AC | 1,091 ms
66,896 KB |
testcase_36 | AC | 1,061 ms
66,840 KB |
testcase_37 | AC | 1,131 ms
127,420 KB |
ソースコード
import numpy as np import scipy p = float(input()) ax, ay = map(float, input().split()) bx, by = map(float, input().split()) cx, cy = map(float, input().split()) def my_pow(x): return np.abs(x) ** p def f(point): x, y = point # print(x, y) anorm = my_pow(ax - x) + my_pow(ay - y) bnorm = my_pow(bx - x) + my_pow(by - y) cnorm = my_pow(cx - x) + my_pow(cy - y) return max(anorm, bnorm, cnorm) - min(anorm, bnorm, cnorm) ans = scipy.optimize.fmin(f, [-100000, 100000], disp=False, maxiter=1000, ftol=1e-9) print(*ans)