http://hihocoder.com/problemset/problem/1454 调了好长时间,谜之WA... 等我以后学好dp再来看为什么吧,先弃坑(╯‵□′)╯︵┻━┻ #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; const int pp = 998244353; const int N = 503; int…
Wannafly挑战赛25游记 A - 因子 题目大意: 令\(x=n!(n\le10^{12})\),给定一大于\(1\)的正整数\(p(p\le10000)\)求一个\(k\)使得\(p^k|x\)并且\(p^{k+1}\not|x\)的因子. 思路: 枚举\(p\)的每一个质因数\(q\),求出它在\(n!\)出现次数\(/p\)中出现次数,取\(\min\)即可.对于一个质因数\(q\),在\(n!\)中出现的次数等于\(\sum_{i=1}^{\inf}\frac n{q^i}\).…
31 Rikka with Parenthesis II (六花与括号II) Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Description 题目描述 As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5423 Rikka with Tree Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 321    Accepted Submission(s): 162 Problem Description As we know, Rikka is p…
Rikka with Parenthesis II 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5831 Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: Correct parenthe…
Rikka with Parenthesis II 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5831 Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: Correct parenthe…
Rikka with Parenthesis II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0 Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situat…
Rikka with Graph II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1051    Accepted Submission(s): 266 Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situati…
Rikka with Tree 题意:给出树的定义,给出树相似的定义和不同的定义,然后给出一棵树,求是否存在一颗树即和其相似又与其不同.存在输出NO,不存在输出YES. 思路:以1号节点为根节点,我们观察到一颗树如果不存在这种树即与其相似又与其不同,那么这棵树要么所有节点的深度都不一样,要么有深度一样的并且他们的父节点都一样,后来想想,如果当前节点的父节点有多个儿子,那么当前节点则不能有儿子节点,否则就可以将儿子节点转移到兄弟节点上.思路很正确,比赛的时候用深搜递归写就错了,改成两层循环枚举任意…
Rikka with Parenthesis II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 136    Accepted Submission(s): 97 Problem Description As we know, Rikka is poor at math. Yuta is worrying about this sit…