快要 CSP-S2 了,複習一下一些演算法(弄文化課弄了好久了,很多東西都要忘了。。。 讀題 題目連結: Luogu P1094 看題, 把購來的紀念品根據價格進行分組,但每組最多隻能包括兩件紀念品 。看樣子,應該是貪心。每次取一個大的,一個小的,就可以保證了。如果大的小的組合起來,超過了最大值,就只取大的。 解題 很容易就可以寫出程式。 1 2 3 4 5 6 7 8 9 10 11 12 13…
Louis Aeilot's Blog 的其他文章
- How Close Is FlashAttention to the Limit? Understanding Attention Through Data Movement
- Beyond FLOPs: How COSMA Builds Parallel Matrix Multiplication from Communication Bounds
- The Red-Blue Pebble Game: Why Faster Processors Still Have to Move Data
- Git Needs a Trash Can
- RoPE: Properties, Patterns, and Long-Context Behavior
讨论
登录后参与讨论
还没有评论,来说第一句吧。