#include
#include
#include
#include
using namespace std;
typedef __int64 LL;
const int Times = 20;
LL factor[100], l;
LL gcd(LL a, LL b)
{
return b ? gcd(b, a%b):a;
}
LL add_mod(LL a, LL b, LL n)...
分类:
其他好文 时间:
2014-08-30 20:28:20
阅读次数:
285
题意:给定a,b,c,x1,x2,y1,y2(都是整数),求有多少组(x,y)满足ax+by+c=0,且x1 2 #include 3 #include 4 #include 5 using namespace std; 6 typedef long long ll; 7 const doub...
分类:
其他好文 时间:
2014-08-30 16:16:49
阅读次数:
241
题目链接
题意:A为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。
思路:简单的矩阵快速幂
代码:
#include
#include
#include
#include
#include
using namespace std;
//typedef long long ll;
typedef __int...
分类:
其他好文 时间:
2014-08-30 00:03:08
阅读次数:
274
题目链接
题意:求n^n的个位数的值。
思路:快速幂求值
代码:
#include
#include
#include
#include
#include
using namespace std;
typedef long long ll;
ll a, b, n, m;
struct mat{
ll s[2][2];
mat() {...
分类:
Web程序 时间:
2014-08-29 22:41:18
阅读次数:
229
Google determines Quality Score slightly differently for each of the different advertising networks that it runs. Here we’ll learn how Quality Score.....
分类:
其他好文 时间:
2014-08-29 20:00:08
阅读次数:
314
li_column1 = GetColumn()ls_columnname = GetColumnName()Send(Handle(This),256,9,Long(0,0))ll_row2 = GetRow()li_column2 = GetColumn()//如果Column有变,说明还没到最...
前提:将数据窗口的下tab键用回车键取代。// event editchangeddatawindowchild ldw_tempString ls_filterLong ll_startIf dwo.Name = 'syjsf02' Then This.GetChild('syjsf0...
分类:
其他好文 时间:
2014-08-29 10:38:37
阅读次数:
179
题目链接
题意:求第n个斐波那契数的递归次数MOD b
思路:用矩阵快速幂求斐波那契数列,然后打表找出递归次数的规律为f(n) = 2 * F(n) - 1(F(n)为斐波那契数)。
代码:
#include
#include
#include
#include
#include
typedef long long ll;
using namespace...
分类:
其他好文 时间:
2014-08-28 21:14:46
阅读次数:
270
Where is the canteen
Problem Description
After a long drastic struggle with himself, LL decide to go for some snack at last. But when steping out of the dormitory, he found a serious problem...
分类:
其他好文 时间:
2014-08-28 13:23:19
阅读次数:
431
A:
这道题目还是很简单的,做过很多遍了,类似于切割木板的问题。
把所有的数放在一个优先队列里,弹出两个最大的,然后合并,把结果放进去。依次进行。
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define LL __int64
#define IN...
分类:
其他好文 时间:
2014-08-27 13:05:07
阅读次数:
222