結果
問題 | No.3074 Divide Points Fairly |
ユーザー |
![]() |
提出日時 | 2025-03-24 21:20:59 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 453 ms / 2,000 ms |
コード長 | 441 bytes |
コンパイル時間 | 261 ms |
コンパイル使用メモリ | 82,604 KB |
実行使用メモリ | 94,504 KB |
最終ジャッジ日時 | 2025-03-27 12:54:20 |
合計ジャッジ時間 | 12,569 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 42 |
ソースコード
n = int(input()) a = [] for i in range(2 * n): x, y = map(int, input().split()) a.append((x, y)) a.sort(lambda x: (x[1], x[0])) from random import randint inf = 10**5 // 2 while True: xx, yy = randint(-inf, inf), randint(-inf, inf) v = [] for x, y in a: val = x * xx + y * yy v.append(val) v.sort() if v[n - 1] - v[n] == 0: continue print(2 * xx, 2 * yy, -(v[n - 1] + v[n])) break