本文出自:http://blog.csdn.net/svitter 题意: f(x) = K, x = 1 f(x) = (a*f(x-1) + b)%m , x > 1 求出( A^(f(1)) + A^(f(2)) + A^(f(3)) + ...... + A^(f(n)) ) modular P. 1 <= n <= 10^6 0 <= A, K, a, b <= 10^9 1 <= m, P <= 10^9 本题目的关键在于大幂的分解和..你要这样想,因…
本文出自:http://blog.csdn.net/svitter 原题:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2624 题意:为什么每次都是我做这么坑爹的题目TAT 一开始的名字我在想名字有没有空格,就像是之前 Sdut2411 Pixel density 山东省第三届ACM省赛(输入输出字符串处理) 这道题目,以至于第一篇WA我根本想不出到底是name的问题还是其他方面的问题.后来证明果然…
排名:http://acm.sdut.edu.cn/sd2012/2013.htm 解题报告:http://www.tuicool.com/articles/FnEZJb A.Rescue The Princess(几何,向量) B.The number of steps(记忆化搜索,概率dp) C.Boring Counting(划分树) D.A-Number and B-Number E.Alice and Bob F.Mountain Subsequences(dp) G.Rubik’s…
点击打开链接 2226: Contest Print Server Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 53  Solved: 18 [Submit][Status][Web Board] Description In ACM/ICPC on-site contests ,3 students share 1 computer,so you can print your source code any time. Here you ne…
2013年"浪潮杯"山东省第四届ACM大学生程序设计竞赛排名:http://acm.upc.edu.cn/ranklist/ 一.第J题坑爹大水题,模拟一下就行了 J:Contest Print Server [题解]: 题目大意:输入 n,s,x,y,mod  分别队伍数n,还有一个s生成函数 s=((s*x)+y)%mod,就是打印机根据要求打印纸张,打印到s时,打印机将重置,生成新的s [code]: #include <iostream> #include <…
Mountain Subsequences 题目描述 Coco is a beautiful ACMer girl living in a very beautiful mountain. There are many trees and flowers on the mountain, and there are many animals and birds also. Coco like the mountain so much that she now name some letter s…
Alice and Bob Time Limit: 1000ms   Memory limit: 65536K 题目描述 Alice and Bob like playing games very much.Today, they introduce a new game. There is a polynomial like this: (a0*x^(2^0)+1) * (a1 * x^(2^1)+1)*.......*(an-1 * x^(2^(n-1))+1). Then Alice as…
Rescue The PrincessCrawling in process... Crawling failed   Description Several days ago, a beast caught a beautiful princess and the princess was put in prison. To rescue the princess, a prince who wanted to marry  the princess set out immediately.…
A : Rescue The Princess 题意: 给你平面上的两个点A,B,求点C使得A,B,C逆时针成等边三角形. 思路: http://www.cnblogs.com/E-star/archive/2013/06/11/3131563.html   向量的旋转. 直接套公式就行,或者我们可以找到等式解一个二元一次方程然后向量判断方向即可.我比较懒,就写了向量旋转的. #include <iostream> #include <cstdio> #include <cm…
题目描述 Cainiao is a university student who loves ACM contest very much. It is a festival for him once when he attends ACM Asia Regional Contest because he always can find some famous ACMers there. Cainiao attended Asia Regional Contest Fuzhou Site on N…