找规律的题
【x】
【a】【x-a】
【y】 【 】【z】
这里面xyz都已知,所以可以求出a = (x + y - z ) /2
#include
int a[9][9];
int main()
{
int t;
scanf("%d",&t);
while(t--){
for(int i=0;i<9;i+=2)
...
分类:
其他好文 时间:
2015-05-12 15:47:37
阅读次数:
117
对棋盘横纵坐标的解读str1="f3"str2="e9"x=abs(str1[0]-str2[0])y=abs(str1[1]-str1[1])如果x==y,在一条斜线上如果x==0或者y==0,在同一横行,或者同一列注意:我们谈的是x个和y个单位,所以加绝对值解题思路:找规律:王:x和y中较大的那...
分类:
其他好文 时间:
2015-05-12 13:23:48
阅读次数:
114
HDU 4588 Count The Carries(数学 二进制 找规律啊)...
分类:
其他好文 时间:
2015-05-11 21:56:06
阅读次数:
134
题意:2 个人玩游戏,从 1 开始,轮流对数进行累乘,直到超过一个指定的值。 解题思路:如果输入是 2 ~ 9 ,因为Stan 是先手,所以Stan 必胜如果输入是 10~18 ,因为Ollie 是后手,不管第一次Stan 乘的是什么,Stan肯定在 2 ~ 9 之间,如果Stan乘以 2 ,那么O...
分类:
其他好文 时间:
2015-05-09 18:57:50
阅读次数:
120
题意:有n堆石子,alice先取,每次可以选择拿走一堆石子中的1~x(该堆石子总数) ,也可以选择将这堆石子分成任意的两堆。alice与bob轮流取,取走最后一个石子的人胜利。思路:因为数的范围比较大,所以最好通过SG打表的结果找出规律在解。sg(4k+1)=4k+1;sg(4k+2)=4k+2;s...
分类:
其他好文 时间:
2015-05-09 18:52:07
阅读次数:
118
http://acm.hdu.edu.cn/showproblem.php?pid=1021//找规律。。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 in....
分类:
其他好文 时间:
2015-05-09 16:22:44
阅读次数:
91
Yaroslav has an array, consisting of (2·n?-?1) integers. In a single operation Yaroslav can change the sign of exactly n elements in the array. In other words, in one operation Yaroslav can select exac...
分类:
其他好文 时间:
2015-05-07 16:49:51
阅读次数:
132
DescriptionIf two people were born one after another with one second difference and one of them is a child, then the other one is a child too. We get ...
分类:
其他好文 时间:
2015-05-07 16:29:12
阅读次数:
134
又是一道博大精深的博弈题目。
已经说了 巴什博弈,威佐夫博弈,尼姆博弈,SG函数,找规律的博弈,这次和找规律有点类似——对称博弈。
一般都是圆啊方啊什么的。
对于这道题而言,可以有三种情况:
①k等于1 一次最多只能拿1个(每堆只有一个),那就是看奇偶了。
②n≤k 这种情况,那肯定先拿的赢。
③ 这条就是对称博弈了, 除了上述两种情况外的情...
分类:
其他好文 时间:
2015-05-06 23:04:24
阅读次数:
287
西电校赛网络赛J题 lucas定理计算组合数问题 J: 找规律II时间限制:1 Sec内存限制:128 MB 提交:96解决:16 [提交][状态][讨论版]题目描述现有数阵如下:1 2 3 4 5 6 1 3 6 10 15 1 4 10 20 1 ...
分类:
其他好文 时间:
2015-05-06 10:41:26
阅读次数:
136