結果

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

テストケース

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

ソースコード

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
    for i in range(6):
        if cur+L[ind][0]+L[0][0]*(5-ind) >= 3000000:
            print L[ind][1]
            ind+=1
        else:
            ind=0
        ind%=N


0