• 2024-03-24AT_abc344_D-String Bags 题解
    明显是DP。然后就开始分析:状态:\(dp_{ij}=\)有\(i\)个袋子且匹配\(T\)的前缀的长度为\(j\)时所需的最少钱数。匹配\(T\)的前缀的长度为\(j\)就是前\(j\)个字符与\(T\)的前\(j\)个字符相同。相对简单。然后看转移。为了方便,咱不妨令\(|S|\)为字符串\(S
  • 2024-03-09abc344_D - String Bags 题解
    一个月没有碰oi,感觉水平已经退化到负的了。来复健一下。D-StringBagslink题意:给你\(n\)组字符串组,按\(1\)~\(n\)的顺序,对于每组字符串组,可从中至多选一个字符串。求能否用所选串按顺序拼接成指定串,以及选取字符串的最小个数。然后读完题发现是个\(01\)背包;对于第
  • 2023-12-11E - Lucky bag
    E-LuckybagProblemStatementAtCoderInc.sellsmerchandiseonitsonlineshop.Thereare$N$itemsremaininginthecompany.Theweightofthe$i$-thitem$(1\leqi\leqN)$is$W_i$.Takahashiwillselltheseitemsas$D$luckybags.Hewantstomin
  • 2023-10-30Plastic Pollution
    Causes:Madefrompolythene,plasticbagsinlandfillsitesaresupposedtolastbetweenaconservative200yearstoanestimated1millionyears.Over2billionbagsarebelievedtobedumpedeverydayinChina,wherethenon-degradablebagsareclogging
  • 2023-10-04基于HSV空间的彩色图像分割技术
    1.引言每当我们看到图像时,它通常都是由各种元素和目标组成的。在某些情况下,我们可能会想要从图像中提取某个特定的对象,大家会怎么做?首先我们会想到的是进行crop相关的操作,这在某种程度上是可行的,但是这通常也会有一些不相关的像素会被包括在内,我确信大多情况下我们不希望这样。事
  • 2023-06-24PANDACU: Second Hand Brand Bags Used Handbag Brand Purse Shoulder Bags Wholesale
    PANDACUisatrustedwholesalesupplierspecializinginsecond-handbrandbags,includingusedhandbagsandbrandpurses.Theyofferawiderangeofoptionsforretailers,resellers,anddistributorsseekinghigh-qualityshoulderbagsatwholesaleprices.
  • 2023-06-24PANDACU: second hand luxury bag and wallet bags designer used leather branded bags wholesale
    PANDACUisareputablewholesalesupplierspecializinginsecond-handluxurybagsandwallets.Theyofferawideselectionofdesignerusedleatherbags,includingbrandedoptions.Withafocusonprovidinghigh-qualityproducts,PANDACUcaterstoretaile
  • 2023-06-20F. Bags with Balls 第二类斯特林数
    BagswithBalls标号为奇数的个数为\(c=\frac{m+1}{2}\)标号为偶数个数为\(w=m-c\)答案显然为\(ANS=\sum_{i=1}^{n}C(n,i)c^iw^{n-i}i^k\)直接算是\(O(n)\)的,但这道题\(n\)为\(1e9\)考虑第二类斯特林数化简\(i^k\)\(x^k=\sum_{i=1}^kC(x,i)s(k,i)i!\)\(ANS=\sum_{i=1}^{n}C
  • 2023-06-12[ABC303G] Bags Game 解题分析
    1题目大意1.1题目翻译有两个人轮流取物品。总共有\(n\)个物品,第\(i\)个物品的价值为\(w_i\)。他们按照下面的其中一种方式取物品:取出这一排物品最前面的或者最后面的。这一步没有代价。设还剩下\(m\)个物品,那么重复取出\(\min(B,m)\)个物品,每次取出最前面的
  • 2023-05-28AtCoder Beginner Contest 303 G Bags Game
    洛谷传送门AtCoder传送门经典题,考虑区间dp,\(f_{l,r}\)表示只考虑\([l,r]\)区间,先手得分减后手得分最大值。对于第一种操作直接\(f_{l,r}\gets\max(a_l-f_{l+1,r},a_r-f_{l,r-1})\),第二种操作,考虑枚举\([l,r]\)长为\(r-l+1-B\)的子段,即可转移。第三种操
  • 2023-02-01Put Marbles in Bags
    PutMarblesinBagsYouhave k bags.Youaregivena0-indexed integerarray weights where weights[i] istheweightofthe ith marble.Youarealsogi
  • 2022-12-25CF334A Candy Bags 题解
    题目传送门题目大意:给你\(n^2\)颗糖,分给\(n\)人,使每个人的权值相等(第\(i\)块的权值为\(i\)),输出第\(i\)个人选的糖果集合,注意题目中说\(n\)为偶数。解题思路
  • 2022-12-20[LeetCode] 1760. Minimum Limit of Balls in a Bag
    Youaregivenanintegerarray nums wherethe ith bagcontains nums[i] balls.Youarealsogivenaninteger maxOperations.Youcanperformthefollowing
  • 2022-11-08第四章 操作列表
    4.1遍历整个列表for适用条件:需要遍历列表的所有元素,对每个元素执行相同的操作编写for循环,对列表中的每个元素,都将执行循环指定的步骤对于存储列表中每个值的临时变量
  • 2022-08-31MathProblem 76 Two bags and marble problem
    Youchooseoneoftwoidenticallookingbagsatrandom.Onebaghasthreeblackmarblesandonewhitemarble.Theotherhasthreewhitemarblesandoneblackm
  • 2022-08-29CF1716F Bags with Balls
    纪念第一个场切的EDU的F。题意:有\(n\)个不同的盒子,每个盒子里有\(m\)个编号分别为\(1\dotsm\)的小球。现在要从每个盒子中恰好取出\(1\)个球,计算每种取法中,