結果

問題 No.231 めぐるはめぐる (1)
ユーザー yaoshimaxyaoshimax
提出日時 2015-06-27 20:32:40
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 437 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 6,580 KB
実行使用メモリ 5,928 KB
最終ジャッジ日時 2023-09-22 03:16:58
合計ジャッジ時間 1,382 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 11 ms
5,840 KB
testcase_02 AC 11 ms
5,872 KB
testcase_03 AC 12 ms
5,864 KB
testcase_04 AC 13 ms
5,904 KB
testcase_05 AC 12 ms
5,872 KB
testcase_06 AC 13 ms
5,864 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 11 ms
5,840 KB
testcase_10 AC 11 ms
5,928 KB
testcase_11 AC 11 ms
5,868 KB
testcase_12 AC 13 ms
5,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(raw_input())
L=[]
for i in range(N):
    G,D=map(int,raw_input().split())
    L.append((G-D*30000,i+1))
L.sort()
L.reverse()
if( L[0][0]*6 < 3000000 ):
    print "NO"
else:
    print "YES"
    ind=0
    cur=0
    num=0
    while num<6:
        if cur+L[ind][0]+L[0][0]*(5-ind) >= 3000000:
            print L[ind][1]
            cur+=L[ind][0]
            ind+=1
            num+=1
        else:
            ind=0
        ind%=N


0