Live2d Test Env
摘要: 有M个球,一开始每个球均有一个初始标号,标号范围为1~N且为整数,标号为i的球有ai个,并保证Σai = M。 每次操作等概率取出一个球(即取出每个球的概率均为1/M),若这个球标号为k(k < N),则将它重新标号为k + 1;若这个球标号为N,则将其重标号为1。(取出球后并不将其丢弃) 现在你需 阅读全文
posted @ 2018-09-18 19:47 nimphy 阅读(366) 评论(0) 推荐(0) 编辑
摘要: On Saint Valentine's Day, Alex imagined to present a special pendant to his girl friend made by K kind of pearls. The pendant is actually a string of 阅读全文
posted @ 2018-09-18 19:26 nimphy 阅读(248) 评论(0) 推荐(0) 编辑
摘要: A cellular automaton is a collection of cells on a grid of specified shape that evolves through a number of discrete time steps according to a set of 阅读全文
posted @ 2018-09-18 16:26 nimphy 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 题意:输入N,输出fib(2^N)%1125899839733759。(P=1125899839733759是素数) 思路:欧拉降幂,因为可以表示为矩阵乘法,2^N在幂的位置,矩阵乘法也可以降幂,所以有ans=a*base^num; num=2^N%(P-1)。 阅读全文
posted @ 2018-09-18 15:31 nimphy 阅读(216) 评论(0) 推荐(0) 编辑
摘要: JRY wants to drag racing along a long road. There are nn sections on the road, the ii-th section has a non-negative integer length sisi. JRY will choo 阅读全文
posted @ 2018-09-18 10:25 nimphy 阅读(442) 评论(0) 推荐(0) 编辑