- 2024-01-17F - Hop Sugoroku
F-HopSugorokuProblemStatementThereisarowof$N$squareslabeled$1,2,\dots,N$andasequence$A=(A_1,A_2,\dots,A_N)$oflength$N$.Initially,square$1$ispaintedblack,theother$N-1$squaresarepaintedwhite,andapieceisplacedonsquar
- 2023-06-18UnfairSugoroku
[ABC298E]UnfairSugoroku考虑令\(f[A][B][0/1]\)表示第一/二个人投完,一、二两人数字为\(A,B\)的概率。\[f[A][B][0]=\dfrac{1}{P}\sum_{i=1}^Pf[A-i][B][1]\]\[f[A][B][1]=\dfrac{1}{Q}\sum_{i=1}^Qf[A][B-i][0]\]复杂度\(O((N+P)(N+Q)(P+Q))\)。转移到\(A,B\)中有
- 2023-05-01[ABC146F] Sugoroku
2023-03-03题目题目传送门翻译翻译难度&重要性(1~10):5题目来源AtCoder题目算法贪心解题思路对于第ii个点,只要到达\(s_{i+1}\cdotss_{i+m}\)中最后一个\(0\)的位置。但是这种方法求出的字典序肯定是最大的,但题目要求的是字典序最小。那么就可以倒序枚举,使第\(
- 2023-04-16ATABC298E Unfair Sugoroku
ATABC298EUnfairSugoroku(笑)题意有一个长为\(N\)行的棋盘,两枚棋子初始时分别位于\(A\),\(B\)两个位置,分别记为\(a\)与\(b\)。两枚棋子分别对应两枚骰子,分别可以等概率的投掷出\(1\simP\)与\(1\simQ\)的点数,并将其对应的棋子移动到\(\min(N,i+X)\)的位置上
- 2022-10-30【atcoder 293 E - Sugoroku 4】【动态规划,递推】
importjava.io.IOException;importjava.util.Arrays;importjava.util.Scanner;publicclassMain{staticintn,m,k;staticintMOD=998244353;
- 2022-10-03ARC149D Simultaneous Sugoroku(并查集)
ARC149DSimultaneousSugoroku有\(N\)个数\(X_i\)和\(M\)个数\(D_i\),对每个\(X_i\)询问依次对\(j=1\ton\)执行:如果\(X_i>0\)就\(-D_j\),如果\(X_i<