結果

問題 No.2390 Udon Coupon (Hard)
ユーザー 👑 MizarMizar
提出日時 2023-06-30 12:34:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 711 ms / 2,000 ms
コード長 405 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 44,716 KB
最終ジャッジ日時 2024-04-15 20:47:52
合計ジャッジ時間 30,254 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 504 ms
44,588 KB
testcase_01 AC 501 ms
44,088 KB
testcase_02 AC 513 ms
44,328 KB
testcase_03 AC 513 ms
44,412 KB
testcase_04 AC 502 ms
44,204 KB
testcase_05 AC 558 ms
44,072 KB
testcase_06 AC 504 ms
44,336 KB
testcase_07 AC 506 ms
44,464 KB
testcase_08 AC 505 ms
44,460 KB
testcase_09 AC 686 ms
44,208 KB
testcase_10 AC 504 ms
44,464 KB
testcase_11 AC 504 ms
44,200 KB
testcase_12 AC 504 ms
44,200 KB
testcase_13 AC 507 ms
44,208 KB
testcase_14 AC 498 ms
44,208 KB
testcase_15 AC 505 ms
44,040 KB
testcase_16 AC 512 ms
44,456 KB
testcase_17 AC 514 ms
44,068 KB
testcase_18 AC 526 ms
44,200 KB
testcase_19 AC 515 ms
44,212 KB
testcase_20 AC 498 ms
44,196 KB
testcase_21 AC 503 ms
44,328 KB
testcase_22 AC 511 ms
44,336 KB
testcase_23 AC 505 ms
44,464 KB
testcase_24 AC 589 ms
44,204 KB
testcase_25 AC 598 ms
44,456 KB
testcase_26 AC 587 ms
44,328 KB
testcase_27 AC 590 ms
44,456 KB
testcase_28 AC 575 ms
44,200 KB
testcase_29 AC 631 ms
44,332 KB
testcase_30 AC 630 ms
44,452 KB
testcase_31 AC 637 ms
44,460 KB
testcase_32 AC 640 ms
44,068 KB
testcase_33 AC 638 ms
44,332 KB
testcase_34 AC 704 ms
44,332 KB
testcase_35 AC 711 ms
43,940 KB
testcase_36 AC 703 ms
44,716 KB
testcase_37 AC 705 ms
44,452 KB
testcase_38 AC 710 ms
44,204 KB
testcase_39 AC 589 ms
44,208 KB
testcase_40 AC 577 ms
44,580 KB
testcase_41 AC 586 ms
44,340 KB
testcase_42 AC 578 ms
44,068 KB
testcase_43 AC 586 ms
44,328 KB
testcase_44 AC 567 ms
44,200 KB
testcase_45 AC 563 ms
44,332 KB
testcase_46 AC 537 ms
44,452 KB
testcase_47 AC 544 ms
44,340 KB
testcase_48 AC 573 ms
44,204 KB
testcase_49 AC 493 ms
44,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
n = int(input())
ab = [list(map(int, input().split())) for _ in range(3)] * 2
print(
	max(
		max(
			np.amax(((d - j * ar) // ap) * bp + i * bq + j * br)
			for i, j, d in zip(
				range(ap),
				map(lambda d: np.arange(0, min(ap, d // ar + 1), dtype=np.uint64), range(n, 0, -aq)),
				range(n, 0, -aq),
			)
		)
		for [[ap, bp], [aq, bq], [ar, br]] in [ab[0:3], ab[1:4], ab[2:5]]
	)
)
0