Description In mathematics, a square number is an integer that is the square of an integer. In other words, it is the product of some integer with itself. For example, 9 is a square number, since it can be written as 3 * 3. Given an array of distinct…
Description A Swiss-system tournament is a tournament which uses a non-elimination format. The first tournament of this type was a chess tournament in Zurich in 1895, hence the name "Swiss system". The tournament will be held based on following…
Binomial Coeffcients TimeLimit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 输入 输出 示例输入 1 1 10 2 954 723 示例输出 /******************* 组合数学 组合数 用 递推  :组合数公式 C[n][m] = C[n-1][m-1] + C[n-1][m] ************************/ Code: #include <iostream> #include…
Crack Mathmen TimeLimit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Since mathmen take security very seriously, theycommunicate in encrypted messages. They cipher their texts in this way: for everycharacther c in the message, they replace c with…
题目描述 We know thatIvan gives Saya three problems to solve (Problem F), and this is the firstproblem. "We need a programmer to help us for some projects. If you show us that youor one of your friends is able to program, you can pass the first hurdle. I…
Description BIGZHUGOD and his three friends are playing a game in a triangle ground. The number of BIGZHUGOD is 0, and his three friends are numbered from 1 to 3. Before the game begins, three friends stand on three vertices of triangle in numerical…
2013年省赛H题你不能每次都快速幂算A^x,优化就是预处理,把10^9预处理成10^5和10^4.想法真的是非常巧妙啊N=100000构造两个数组,f1[N],间隔为Af2[1e4]间隔为A^N,中间用f1来填补f[x]=f1[x%N]*f2[x/N]%P; #include<iostream> #include<cstdio> #include<queue> #include<algorithm> #include<cmath> #inclu…
Biggest Number 时间限制:1000 ms  |  内存限制:65535 KB 难度:4 描述 You have a maze with obstacles and non-zero digits in it: You can start from any square, walk in the maze, and finally stop at some square. Each step, you may only walk into one of the four neighb…
A.Nias and Tug-of-War(sort排序) B.Lowest Unique Price(set+map) C.Game!(博弈) D.Stars E.BIGZHUGOD and His Friends I F.BIGZHUGOD and His Friends II G.Cube Number(质因数分解) H.Square Number(质因数分解) I.Routing Table J.Single Round Math(大数) K.Last Hit L.Circle of F…
题目描述 In mathematics, a square number is an integer that is the square of an integer. In other words, it is the product of some integer with itself. For example, 9 is a square number, since it can be written as 3 * 3. Given an array of distinct intege…