C:显然每p2个数会有一个0循环,其中22 32 52 72的循环会在200个数中出现,找到p2循环的位置就可以知道首位在模p2意义下是多少,并且循环位置几乎是唯一的(对72不满足但可能的位置也很少).于是这样枚举范围就直接从1e9变成了1e9/44100.然后考虑暴力求μ验证,求μ可以以O(n1/3/lnn)的时间完成,即对n1/3内的质数暴力check并除掉,剩下的直接判断是不是平方数即可.最后只要相信200个数匹配一会就break了就能过了. #include<bits/stdc++.h>…
2018-2019 ACM-ICPC, Asia East Continent Finals 总体情况 本次训练共3小时20分钟,通过题数4. 解题报告 D. Deja vu of - Go Players 题意 \(A,B\)博弈,\(A\)有\(N\)堆石子,第\(i\)堆数量\(a_i\): \(B\)有\(M\)堆石子,第\(i\)堆数量\(b_i\).每次每个人可以从自己拥有的石子堆中选取任意一堆并拿走任意正整数个石子.先拿完的人赢.求胜负情况.$N,M \leq 100, $ $a_…
题目链接: http://codeforces.com/gym/102056/problem/I 题意: 人物有l两个属性分别是$A,D$ 每个回合人物$A\pm D$ 每个回合有三个选择分别是: 1,对怪物造成$a_i+A$的伤害 2,$A\pm c_i$ 3,$D\pm b_i$ 求n回合后对怪物造成的最大伤害 数据范围: $1 \le n \le 100$ $1\le a_i, b_i, c_i \le 10^9$ 分析: 虽然比赛的时候想到了用DP来做也想到了逆序处理,但是一直不知道怎么…
D. Deja vu of … Go Players 签. #include <bits/stdc++.h> using namespace std; int t, n, m; int main() { scanf("%d", &t); while (t--) { scanf("%d%d", &n, &m); ; i <= n + m; ++i) scanf("%*d"); puts(n <= m…
Miku is matchless in the world!” As everyone knows, Nakano Miku is interested in Japanese generals, so Fuutaro always plays a kind of card game about generals with her. In this game, the players pick up cards with generals, but some generals have con…
QSC and Master Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 859    Accepted Submission(s): 325 Problem Description Every school has some legends, Northeastern University is the same. Enter…
Problem Description Elves are very peculiar creatures. As we all know, they can live for a very long time and their magical prowess are not something to be taken lightly. Also, they live on trees. However, there is something about them you may not kn…
http://acm.hdu.edu.cn/showproblem.php?pid=5444 Elven Postman Time Limit: 1500/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 939    Accepted Submission(s): 520 Problem Description Elves are very peculiar crea…
Elven Postman Time Limit: 1500/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 591    Accepted Submission(s): 329 Problem Description Elves are very peculiar creatures. As we all know, they can live for a very…
http://acm.hdu.edu.cn/showproblem.php?pid=4710 Balls Rearrangement Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 735    Accepted Submission(s): 305 Problem Description Bob has N balls and A b…