結果

問題 No.322 Geometry Dash
コンテスト
ユーザー ichyo
提出日時 2015-12-14 19:25:04
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 573 ms / 2,000 ms
コード長 366 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 153 ms
コンパイル使用メモリ 76,856 KB
最終ジャッジ日時 2025-12-03 18:34:45
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/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