結果
| 問題 |
No.5009 Draw A Convex Polygon
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-17 23:20:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 584 bytes |
| コンパイル時間 | 293 ms |
| コンパイル使用メモリ | 82,192 KB |
| 実行使用メモリ | 352,876 KB |
| スコア | 0 |
| 最終ジャッジ日時 | 2024-07-17 23:20:26 |
| 合計ジャッジ時間 | 8,275 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 |
ソースコード
import math
N = 10**6
st = set()
ok = False
for i in range(1, 1300):
for j in range(1, 1300):
g = math.gcd(i, j)
st.add((math.atan2(j//g, i//g), i//g, j//g))
if len(st) == N:
ok = True
break
if ok == True:
break
L = list(st)
L.sort()
ans = []
nowx = -10**9 + 1
nowy = -10**9 + 1
for i in range(N):
x, y = L[i][1], L[i][2]
nowx += x
nowy += y
# ans.append((nowx, nowy))
ans.append(str(nowx) + ' ' + str(nowy))
print(N)
print('\n'.join(ans))
# for i in range(N):
# print(ans[i][0], ans[i][1])