結果

問題 No.2693 Sword
ユーザー sasa8uyauyasasa8uyauya
提出日時 2024-03-23 03:50:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 304 bytes
コンパイル時間 348 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 68,564 KB
最終ジャッジ日時 2024-03-23 03:50:39
合計ジャッジ時間 3,241 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 37 ms
53,460 KB
testcase_03 WA -
testcase_04 AC 38 ms
53,460 KB
testcase_05 AC 37 ms
53,460 KB
testcase_06 AC 37 ms
53,460 KB
testcase_07 AC 37 ms
53,460 KB
testcase_08 AC 38 ms
53,460 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 44 ms
59,448 KB
testcase_15 AC 57 ms
64,272 KB
testcase_16 WA -
testcase_17 AC 63 ms
66,468 KB
testcase_18 AC 53 ms
64,284 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 58 ms
66,340 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 38 ms
53,460 KB
testcase_25 AC 38 ms
53,460 KB
testcase_26 AC 37 ms
53,460 KB
testcase_27 AC 37 ms
53,460 KB
testcase_28 AC 37 ms
53,460 KB
testcase_29 AC 38 ms
53,460 KB
testcase_30 AC 37 ms
53,460 KB
testcase_31 WA -
testcase_32 AC 64 ms
66,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,p,k=map(int,input().split())
x=10**18
g=-1
items=[tuple(map(int,input().split())) for i in range(n)]
for i in range(k+1):
	f=p
	c=0
	d=0
	for j in range(n):
		t,b=items[j]
		if t==1:
			if c<i:
				f+=b
				c+=1
		else:
			if c+d<k and f<=x:
				f*=2
				d+=1
	if c+d==k and f<=x:
		g=max(g,f)
print(g)
0