結果
問題 | No.322 Geometry Dash |
ユーザー |
![]() |
提出日時 | 2016-07-14 18:19:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 956 ms / 2,000 ms |
コード長 | 490 bytes |
コンパイル時間 | 103 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 41,480 KB |
最終ジャッジ日時 | 2024-11-08 19:08:10 |
合計ジャッジ時間 | 23,895 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
#!/usr/bin/env python3 import collections import functools Spot = collections.namedtuple("Spot", "i t d") def spot_cmp(spot1, spot2): return spot2.t * spot1.d - spot1.t * spot2.d def main(): n = int(input()) ts = map(int, input().split()) ds = map(int, input().split()) spots = [Spot(*args) for args in zip(range(1, n + 1), ts, ds)] spots.sort(key=functools.cmp_to_key(spot_cmp)) print(*(spot.i for spot in spots)) if __name__ == '__main__': main()