hdu 5975 Aninteresting game】的更多相关文章

Aninteresting game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 209    Accepted Submission(s): 82 Problem Description Let’s play a game.We add numbers 1,2...n in increasing order from 1 and p…
Let’s play a game.We add numbers 1,2...n in increasing order from 1 and put them into some sets. When we add i,we must create a new set, and put iinto it.And meanwhile we have to bring [i-lowbit(i)+1,i-1] from their original sets, and put them into t…
HDU 5973:http://acm.hdu.edu.cn/showproblem.php?pid=5975 题意: 有两堆石子,每次可以从一堆石子中取任意个,或者从两堆石子中取相同个数的石子.两个人轮流用这种策略取石子,谁取完所有的石子就算胜利.问先手胜还是后手胜. 思路: 一模一样的威佐夫博奕(Wythoff Game),结论的是,假设a>b,那么如果((1+sqrt(5))* (a - b))/2 == b ,那么先手必输.但是这道题的数据比较大,所以需要java做高精度. import…
最近想从头开始刷点基础些的题,正好有个网站有关于各大oj的题目分类(http://www.pythontip.com/acm/problemCategory),所以写了点脚本把hdu和poj的一些题目链接按分类爬下来,然后根据题目的AC数目来作为难度指标进行从易到难的排序: POJ       题目标号  通过数 搜索: 1011 336071664 201111321 197841753 185021979 182532386 161761742 122131915 120101579 950…
Saving HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7194    Accepted Submission(s): 3345 Problem Description 话说上回讲到海东集团面临内外交困,公司的元老也只剩下XHD夫妇二人了.显然,作为多年拼搏的商人,XHD不会坐以待毙的.  一天,当他正在苦思冥想解困良策的…
http://acm.hdu.edu.cn/showproblem.php?pid=3037 Lucas定理模板. 现在才写,noip滚粗前兆QAQ #include<cstdio> #include<cstring> #include<algorithm> using namespace std; typedef long long ll; int jc[100003]; int p; int ipow(int x, int b) { ll t = 1, w = x;…
http://acm.hdu.edu.cn/showproblem.php?pid=4859 题目大意: 在一个矩形周围都是海,这个矩形中有陆地,深海和浅海.浅海是可以填成陆地的. 求最多有多少条方格线满足两侧分别是海洋和陆地 这道题很神 首先考虑一下,什么情况下能够对答案做出贡献 就是相邻的两块不一样的时候 这样我们可以建立最小割模型,可是都说是最小割了 无法求出最大的不相同的东西 所以我们考虑转化,用总的配对数目 - 最小的相同的对数 至于最小的相同的对数怎么算呢? 我们考虑这样的构造方法:…
Special equations Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 4569 Description Let f(x) = a nx n +...+ a 1x +a 0, in which a i (0 <= i <= n) are all known integers. We call f(x) 0 (mod…
The kth great number Time Limit:1000MS     Memory Limit:65768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 4006 Description Xiao Ming and Xiao Bao are playing a simple Numbers game. In a round Xiao Ming can choose to write down a nu…
How many integers can you find Time Limit:5000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1796 Description   Now you get a number N, and a M-integers set, you should find out how many integers which are sm…