Codeforces 🟢 CF2053D. Refined Product Optimality
利用排序不等式,最大乘積為排序後對應陣列的最小值之積。修改操作時,利用二分搜尋找到排序陣列中該數值的最後一個位置進行更新,既能維持有序性,又能用 O(1) 更新乘積。
最新文章
標籤
AlgoAtCoderPythonAtCoder Beginner ContestABC模擬(Simulation)狀態壓縮計數(Counter)前綴和(Prefix Sum)貢獻法縮點有序容器(Sorted Container)C++模運算(Modular Arithmetic)雜湊表(Hash Table)回溯(Backtracking)DFSBFS樹狀陣列(Binary Indexed Tree)逆序對(Inverse Pair)樹(Tree)計數(Counting)分組循環迭代(Iteration)遞迴(Recursion)字串(String)併查集(Disjoint Set Union)博弈論(Game Theory)動態規劃(Dynamic Programming)記憶化搜尋(Memoization)
網站資訊
文章數量 :
337
總字數 :
492.5k
最後更新時間 :


![Luogu 🟡 P2196 [NOIP 1996 提高组] 挖地雷](https://i.gdst.dev/cover/P2196.webp)
![Luogu 🟡 P1434 [SHOI2002] 滑雪](https://i.gdst.dev/cover/P1434.webp)

![Luogu 🟢 P5937 [CEOI 1999] Parity Game](https://i.gdst.dev/cover/P5937.webp)
![Luogu 🔵 P1966 [NOIP 2013 提高组] 火柴排队](https://i.gdst.dev/cover/P1966.webp)
![Luogu 🔵 P4375 [USACO18OPEN] Out of Sorts G](https://i.gdst.dev/cover/P4375.webp)