結果

問題 No.322 Geometry Dash
ユーザー ichyo
提出日時 2015-12-14 19:25:04
言語 Python2
(2.7.18)
結果
AC  
実行時間 568 ms / 2,000 ms
コード長 366 bytes
コンパイル時間 364 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 19,668 KB
最終ジャッジ日時 2024-11-08 10:50:50
合計ジャッジ時間 15,824 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python

n = int(raw_input())
a = map(int, raw_input().split())
b = map(int, raw_input().split())

answer = list(range(n))


def comp(x, y):
    A = a[x] * b[y]
    B = a[y] * b[x]
    if A < B:
        return -1
    elif A > B:
        return +1
    else:
        return 0

answer.sort(cmp=comp, reverse=True)

print(' '.join(str(x + 1) for x in answer))
0