結果

問題 No.231 めぐるはめぐる (1)
ユーザー mkawa2mkawa2
提出日時 2019-12-25 08:57:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 32 ms / 1,000 ms
コード長 839 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 12,032 KB
実行使用メモリ 10,252 KB
最終ジャッジ日時 2023-10-24 19:17:59
合計ジャッジ時間 1,223 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,252 KB
testcase_01 AC 32 ms
10,248 KB
testcase_02 AC 31 ms
10,248 KB
testcase_03 AC 31 ms
10,248 KB
testcase_04 AC 31 ms
10,252 KB
testcase_05 AC 31 ms
10,248 KB
testcase_06 AC 30 ms
10,248 KB
testcase_07 AC 31 ms
10,248 KB
testcase_08 AC 31 ms
10,248 KB
testcase_09 AC 31 ms
10,248 KB
testcase_10 AC 30 ms
10,248 KB
testcase_11 AC 30 ms
10,248 KB
testcase_12 AC 31 ms
10,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import *
from math import *
from collections import *
from heapq import *
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MF(): return map(float, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LF(): return list(map(float, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    n=II()
    mx=0
    mxi=0
    for i in range(n):
        g,d=MI()
        dg=g-30000*d
        if dg>mx:
            mx=dg
            mxi=i
    if mx*6>=3000000:
        print("YES")
        for _ in range(6):
            print(mxi+1)
    else:
        print("NO")
        
main()
0