摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=2721题意:给出a、b、c、s。s是初值,每次变化有s = (a*s+b)%c。如此直到重复。这些数都写成16比特的,如果某位在所有数都是0则输出0,是1则输出1,如果都有可能输出问号。直接暴搞就可以。。。代码: 1 # include 2 # include 3 4 5 int vis[70000] ; 6 7 8 int main () 9 {10 int a, b, c, s, i, bit ;11 char ch[20] ;12 13 while (~... 阅读全文
posted @ 2013-09-06 05:33 Seraph2012 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=2719题意:给一些字符串,把字符串输出。如果有题目里的那7种字符,按%数值的形式输出。代码: 1 # include 2 # include 3 4 5 char str[100] ; 6 char t[] = " !$%()*" ; 7 int p[] = {0x20, 0x21, 0x24, 0x25, 0x28, 0x29, 0x2a} ; 8 9 10 int main ()11 {12 int i, j ;13 while (gets (str))14 {15... 阅读全文
posted @ 2013-09-06 03:06 Seraph2012 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=1527题意:中文。mark:经典博弈,传说中的Wythoff’s Game。论文在此:http://scimath.unl.edu/MIM/files/MATExamFiles/Cotton_MATpaper_Final_EDITED.pdf值得一提的是论文里提到的神奇的贝蒂定理(Beatty Theorem):若a和b都是无理数且1/a + 1/b == 1,则{[a],[2a],[3a]...}和{[b],[2b],[3b]...}这两个集合没有相同元素且他们的并组成正整数集。([x]表示对x下取整 阅读全文
posted @ 2013-09-06 02:56 Seraph2012 阅读(248) 评论(0) 推荐(0) 编辑