結果

問題 No.710 チーム戦
ユーザー mkawa2mkawa2
提出日時 2020-09-25 18:44:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 176 ms / 3,000 ms
コード長 964 bytes
コンパイル時間 357 ms
コンパイル使用メモリ 11,012 KB
実行使用メモリ 30,960 KB
最終ジャッジ日時 2023-09-10 14:40:26
合計ジャッジ時間 7,022 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 149 ms
30,880 KB
testcase_01 AC 146 ms
30,880 KB
testcase_02 AC 160 ms
30,796 KB
testcase_03 AC 157 ms
30,788 KB
testcase_04 AC 159 ms
30,936 KB
testcase_05 AC 160 ms
30,840 KB
testcase_06 AC 168 ms
30,660 KB
testcase_07 AC 160 ms
30,784 KB
testcase_08 AC 160 ms
30,712 KB
testcase_09 AC 161 ms
30,868 KB
testcase_10 AC 166 ms
30,800 KB
testcase_11 AC 167 ms
30,932 KB
testcase_12 AC 173 ms
30,880 KB
testcase_13 AC 168 ms
30,736 KB
testcase_14 AC 167 ms
30,876 KB
testcase_15 AC 172 ms
30,928 KB
testcase_16 AC 174 ms
30,672 KB
testcase_17 AC 176 ms
30,704 KB
testcase_18 AC 175 ms
30,612 KB
testcase_19 AC 171 ms
30,704 KB
testcase_20 AC 164 ms
30,948 KB
testcase_21 AC 162 ms
30,760 KB
testcase_22 AC 159 ms
30,960 KB
testcase_23 AC 165 ms
30,796 KB
testcase_24 AC 159 ms
30,780 KB
testcase_25 AC 139 ms
30,892 KB
testcase_26 AC 139 ms
30,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from operator import itemgetter
from itertools import *
from bisect import *
from collections import *
from heapq import *
import sys

sys.setrecursionlimit(10**6)

def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def SI(): return sys.stdin.readline()[:-1]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
int1 = lambda x: int(x)-1
def MI1(): return map(int1, sys.stdin.readline().split())
def LI1(): return list(map(int1, sys.stdin.readline().split()))
p2D = lambda x: print(*x, sep="\n")
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

import numpy as np

n=II()
inf=100005
mx=50005
dp=np.full(mx,inf,dtype="i8")
dp[0]=0
for _ in range(n):
    a,b=MI()
    ndp=dp+b
    ndp[a:]=np.minimum(ndp[a:],dp[:mx-a])
    dp=ndp
# print(dp)
print(np.min(np.maximum(dp,np.arange(mx))))
0