結果

問題 No.322 Geometry Dash
ユーザー ichyo
提出日時 2015-12-14 19:26:16
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 374 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 19,412 KB
最終ジャッジ日時 2024-09-15 12:39:33
合計ジャッジ時間 20,615 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 1 WA * 26
権限があれば一括ダウンロードができます

ソースコード

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] + 1
    B = a[y] * b[x] - 1
    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