結果

問題 No.322 Geometry Dash
ユーザー ichyoichyo
提出日時 2015-12-14 19:25:04
言語 Python2
(2.7.18)
結果
AC  
実行時間 605 ms / 2,000 ms
コード長 366 bytes
コンパイル時間 432 ms
コンパイル使用メモリ 7,168 KB
実行使用メモリ 19,672 KB
最終ジャッジ日時 2024-04-25 22:43:35
合計ジャッジ時間 16,393 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,812 KB
testcase_01 AC 12 ms
6,812 KB
testcase_02 AC 12 ms
6,944 KB
testcase_03 AC 11 ms
6,944 KB
testcase_04 AC 140 ms
17,916 KB
testcase_05 AC 296 ms
17,784 KB
testcase_06 AC 380 ms
17,880 KB
testcase_07 AC 447 ms
17,704 KB
testcase_08 AC 495 ms
18,188 KB
testcase_09 AC 296 ms
17,784 KB
testcase_10 AC 367 ms
17,972 KB
testcase_11 AC 441 ms
18,012 KB
testcase_12 AC 502 ms
17,716 KB
testcase_13 AC 536 ms
18,344 KB
testcase_14 AC 383 ms
17,872 KB
testcase_15 AC 441 ms
17,748 KB
testcase_16 AC 512 ms
17,900 KB
testcase_17 AC 547 ms
17,736 KB
testcase_18 AC 571 ms
18,328 KB
testcase_19 AC 449 ms
17,812 KB
testcase_20 AC 515 ms
17,560 KB
testcase_21 AC 561 ms
17,784 KB
testcase_22 AC 582 ms
18,312 KB
testcase_23 AC 593 ms
18,672 KB
testcase_24 AC 502 ms
18,172 KB
testcase_25 AC 537 ms
18,292 KB
testcase_26 AC 570 ms
18,324 KB
testcase_27 AC 592 ms
18,660 KB
testcase_28 AC 605 ms
19,124 KB
testcase_29 AC 500 ms
18,688 KB
testcase_30 AC 559 ms
19,672 KB
権限があれば一括ダウンロードができます

ソースコード

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