結果
| 問題 |
No.2693 Sword
|
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2024-03-23 03:50:35 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 304 bytes |
| コンパイル時間 | 183 ms |
| コンパイル使用メモリ | 82,364 KB |
| 実行使用メモリ | 68,148 KB |
| 最終ジャッジ日時 | 2024-09-30 13:01:50 |
| 合計ジャッジ時間 | 2,494 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | AC * 18 WA * 11 |
ソースコード
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)
sasa8uyauya