- 博客(5)
- 收藏
- 关注
转载 How Many Tables HDU - 1213
Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the friends know each oth...
2017-05-20 18:14:00 67
转载 对时间复杂度的简单理解
时间复杂度:计算机科学中,算法的时间复杂度是一个函数,它定量描述了该算法的运行时间(百度)。时间复杂度常用来估算一个程序在n为一定值的时候需要的时间,来判断你的算法是否高效。 通常时间复杂度和渐进时间复杂度不做区分。下面给例题。 1:a=b;b=c;a=c; T(n)=1。 2:(1) x=0;y=0; (2) for(k-1;k<=n;k++) (3)...
2017-02-12 14:52:00 110
转载 对快速幂的理解
以下是本人自己的看法,如果有不对请指出: 快速幂其实就是一种简化计算幂所需时间的方法 ; 模板代码如下: 假设求 a^b%mod int res=1; while(b) { if(b&1) res=res*a%mod [1] // (b&1)是二进制的与,用于判断最低位是否有1; 这里运用了模的基本算法 (a...
2017-01-19 12:29:00 79
转载 Raising Modulo Numbers
For each assingnement there is the only one line of output. On this line, there is a number, the result of expression (A1B1+A2B2+ ... +AHBH)mod M. Sample Input 3 16 4 2 3 3 4 4 5 ...
2017-01-19 10:43:00 78
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人