結果

問題 No.322 Geometry Dash
コンテスト
ユーザー ichyo
提出日時 2015-12-14 19:26:16
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 374 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 319 ms
コンパイル使用メモリ 77,476 KB
最終ジャッジ日時 2025-12-03 18:35:02
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 1 WA * 26
権限があれば一括ダウンロードができます

ソースコード

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] + 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