結果

問題 No.322 Geometry Dash
ユーザー ichyoichyo
提出日時 2015-12-14 19:25:04
言語 Python2
(2.7.18)
結果
AC  
実行時間 538 ms / 2,000 ms
コード長 366 bytes
コンパイル時間 550 ms
コンパイル使用メモリ 6,592 KB
実行使用メモリ 19,328 KB
最終ジャッジ日時 2023-08-08 05:03:54
合計ジャッジ時間 16,267 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
5,856 KB
testcase_01 AC 11 ms
6,032 KB
testcase_02 AC 11 ms
5,856 KB
testcase_03 AC 10 ms
5,880 KB
testcase_04 AC 139 ms
17,408 KB
testcase_05 AC 281 ms
17,364 KB
testcase_06 AC 357 ms
17,288 KB
testcase_07 AC 418 ms
17,220 KB
testcase_08 AC 459 ms
17,720 KB
testcase_09 AC 282 ms
17,328 KB
testcase_10 AC 345 ms
17,484 KB
testcase_11 AC 420 ms
17,456 KB
testcase_12 AC 463 ms
17,240 KB
testcase_13 AC 497 ms
17,832 KB
testcase_14 AC 358 ms
17,484 KB
testcase_15 AC 421 ms
17,376 KB
testcase_16 AC 477 ms
17,360 KB
testcase_17 AC 519 ms
17,420 KB
testcase_18 AC 522 ms
17,776 KB
testcase_19 AC 418 ms
17,200 KB
testcase_20 AC 474 ms
17,372 KB
testcase_21 AC 516 ms
17,436 KB
testcase_22 AC 535 ms
17,720 KB
testcase_23 AC 534 ms
18,176 KB
testcase_24 AC 459 ms
17,780 KB
testcase_25 AC 494 ms
17,720 KB
testcase_26 AC 526 ms
17,812 KB
testcase_27 AC 536 ms
18,252 KB
testcase_28 AC 538 ms
18,644 KB
testcase_29 AC 444 ms
18,168 KB
testcase_30 AC 487 ms
19,328 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