Traversal Best Solver Minimum Cut Dividing This Product Excited Database Fang Fang Matches Puzzle Game Hold Your Hand Stability Jesus Is Here Poker Largest Point Manors…
总结汇总:模板 int getmax_min(char s[]) {//字符串的最大表示法:返回最小数组下标 , j = , k = ; while(i < len && j < len) { k = ; while(s[i+k] == s[j+k] && k < len) k++; if(k == len) return min(i,j); if (s[i + k] < s[j + k]) > j) i = i + k + ; else i…
原题地址:http://acm.hdu.edu.cn/showproblem.php?pid=5901 题意:输入n,输出n以内质数个数 模板题,模板我看不懂,只是存代码用. 官方题解链接:https://async.icpc-camp.org/d/560-2016 /************************************************************ 这个模板我一点都不会,代码是从codeforces上抄的,佚名 pi(i)表示i以内质数的个数 ******…
2018 ICPC 沈阳网络赛 Call of Accepted 题目描述:求一个算式的最大值与最小值. solution 按普通算式计算方法做,只不过要同时记住最大值和最小值而已. Convex Hull 题目描述:定义函数\(gay(x)\),若\(x\)是某个非\(1\)的数的平方的倍数,则\(gay(x)=0\),否则\(gay(x)=x^2\),求\(\sum_{num=1}^{n} ( \sum_{i=1}^{num} gay(x) ) mod p\) solution \[\sum…
距离长春区域赛结束已经4天了,是时候整理一下这次比赛的点点滴滴了. 也是在比赛前一周才得到通知要我参加长春区域赛,当时也是既兴奋又感到有很大的压力,毕竟我的第一场比赛就是区域赛水平,还是很有挑战性的.在接到通知后,我便开始临阵抱佛脚,课也不怎么听了,上课把时间全都用在了看各种算法上,回到实验室便整理模板.开cf练手.在去比赛前,已经将所看过的算法模板都整理好了. 周五上午9点三刻左右,我们便出发了,需要经历12个小时才能到达我们此次的目的地——长春,途中我还将计算几何稍微看了一下.直到晚上11点…
"Oh, There is a bipartite graph.""Make it Fantastic." X wants to check whether a bipartite graph is a fantastic graph. He has two fantastic numbers, and he wants to let all the degrees to between the two boundaries. You can pick up sev…
One day in the jail, F·F invites Jolyne Kujo (JOJO in brief) to play tennis with her. However, Pucci the father somehow knows it and wants to stop her. There are NN spots in the jail and MM roads connecting some of the spots. JOJO finds that Pucci kn…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6199 题意:n堆石子,Alice和Bob来做游戏,一个人选择取K堆那么另外一个人就必须取k堆或者k+1堆,两个人都想使用最优策略使得取出的石子的和的差值最大. 解法:http://blog.csdn.net/DorMOUSENone/article/details/77929439 膜大牛 用动态规划的思路来思考,每个人都想最大化自己和另外一个人的差值,其实这个题,完全可以省掉判断是谁的这一维,使得…
Given a rooted tree ( the root is node 11 ) of NN nodes. Initially, each node has zero point. Then, you need to handle QQ operations. There're two types: 1\ L\ X1 L X: Increase points by XX of all nodes whose depth equals LL ( the depth of the root i…
17.64% 1000ms 131072K   A sequence of integer \lbrace a_n \rbrace{an​} can be expressed as: \displaystyle a_n = \left\{ \begin{array}{lr} 0, & n=0\\ 2, & n=1\\ \frac{3a_{n-1}-a_{n-2}}{2}+n+1, & n>1 \end{array} \right.an​=⎩⎨⎧​0,2,23an−1​−an−…