結果
| 問題 |
No.5009 Draw A Convex Polygon
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-20 11:08:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 470 bytes |
| コンパイル時間 | 364 ms |
| コンパイル使用メモリ | 81,880 KB |
| 実行使用メモリ | 6,944 KB |
| スコア | 0 |
| 最終ジャッジ日時 | 2024-07-20 11:08:37 |
| 合計ジャッジ時間 | 8,316 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 |
ソースコード
N = 10**6
L = []
for i in range(1, 1300):
for j in range(1, 1300):
L.append((j/i, i, j))
L.sort()
ans = []
nowx = -10**9 + 1
nowy = -10**9 + 1
nowslope = -1
for i in range(1, N):
slope = L[i][0]
x, y = L[i][1], L[i][2]
if slope <= nowslope:
continue
nowx += x
nowy += y
nowslope = slope
ans.append(str(nowx) + ' ' + str(nowy))
print(N)
print('\n'.join(ans))
# for i in range(N):
# print(ans[i][0], ans[i][1])