• 2024-03-19JB Wants to Earn Big Money(The 19th Zhejiang Provincial Collegiate Programming Contest)
    #include<bits/stdc++.h>#defineendl'\n'usingll=longlong;typedefunsignedlonglongull;usingnamespacestd;voidGordenGhost();signedmain(){#ifdefGordenfreopen("in.txt","rt",stdin);freopen
  • 2024-03-10F - Earn to Advance
    F-EarntoAdvanceProblemStatementThereisagridwith$N$rowsand$N$columns.Let$(i,j)$denotethesquareatthe$i$-throwfromthetopand$j$-thcolumnfromtheleft.Takahashiisinitiallyatsquare$(1,1)$withzeromoney.WhenTakahashiis
  • 2023-09-08【题解】CF1854B Earn or Unlock
    你考虑,我们很容易地可以构造一个\(n^2\)的DP:\(f_{i,j}\)表示当前在\(i\)张牌,还可以摸\(j\)张牌的最大分数。转移也很好转移,你考虑一眼就会。但是我们显然要缩减复杂度,我们看到数据范围\(10^5\),想到了根号。分块???显然不行。莫队???都没有区间查询,怎么行呢?然后你苦思冥想
  • 2023-08-27Codeforces Round 889 (Div. 1) B. Earn or Unlock(dp,bitset)
    题目链接:https://codeforces.com/problemset/problem/1854/B 题目大致题意: 有n张卡牌从上到下堆叠,每张卡片有锁或不锁俩种状态,一开始第一张是不锁的;对最上面的卡牌,如果他是不锁的状态,那么可以进行俩种操作:1:从上到下,将v张被锁的卡牌解锁;2:获取v点能量现在求能获得的最大的