結果
問題 |
No.3130 Twin's Add Max Min Game
|
ユーザー |
|
提出日時 | 2025-04-25 22:40:23 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 313 bytes |
コンパイル時間 | 448 ms |
コンパイル使用メモリ | 82,356 KB |
実行使用メモリ | 137,400 KB |
最終ジャッジ日時 | 2025-04-25 22:40:35 |
合計ジャッジ時間 | 11,283 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 45 WA * 11 |
ソースコード
from collections import defaultdict n=int(input()) A=list(map(int,input().split())) B=list(map(str,input().split())) A.sort(reverse=1) D=defaultdict(int) for e in B: D[e]+=1 x=0 for _ in range(D["add"]): x+=A.pop() for _ in range(D["max"]): x=max(x,A.pop()) for _ in range(D["min"]): x=min(x,A.pop()) print(x)