結果
| 問題 | No.3130 Twin's Add Max Min Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-25 22:40:23 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 313 bytes |
| 記録 | |
| コンパイル時間 | 219 ms |
| コンパイル使用メモリ | 95,856 KB |
| 実行使用メモリ | 156,696 KB |
| 最終ジャッジ日時 | 2026-07-10 07:29:52 |
| 合計ジャッジ時間 | 12,137 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)