結果
| 問題 |
No.5009 Draw A Convex Polygon
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-27 15:56:21 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 481 bytes |
| コンパイル時間 | 573 ms |
| コンパイル使用メモリ | 82,752 KB |
| 実行使用メモリ | 354,832 KB |
| スコア | 0 |
| 最終ジャッジ日時 | 2025-04-27 15:56:31 |
| 合計ジャッジ時間 | 8,882 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / 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()
# print(L)
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])