按图示方法,给出N个点,求一共有多少种组成方式
DP打表
#include "stdio.h"
#include "string.h"
int mod=1000000007;
__int64 dp[1010][1010],sum[1010];
int main()
{
int i,j,k,Case,n;
memset(dp,0,sizeof(dp));
me...
分类:
其他好文 时间:
2014-10-31 12:01:10
阅读次数:
138
先介绍两个:大数的GcdStein+欧几里德 function stein(a,b:int64):int64;begin if a>1,b>>1)>1,b)); if (b and 1)=0 then exit(stein(a,b>>1)); exit(stein((...
分类:
其他好文 时间:
2014-10-29 19:14:03
阅读次数:
216
HDU 4549 M斐波那契数列 ( 矩阵快速幂 + 费马小定理 )题意:中文题,不解释分析:最好的分析就是先推一推前几项,看看有什么规律#include #include #include using namespace std;typedef __int64 LL;#define CLR( a,...
分类:
其他好文 时间:
2014-10-29 14:24:52
阅读次数:
229
public string GetTime(DateTime dt) { Int64 retval = 0; DateTime st = new DateTime(1970, 1, 1); TimeSpan t = (...
分类:
编程语言 时间:
2014-10-28 17:18:48
阅读次数:
161
_int64 c(int a,int b){ __int64 i,j,n[30],m[30],k=0,g=1; if(b==0) return 1; for(i=0;i<=b-1;i++) { n[i]=a-k; m[i]=b-k; k++; } for(i=0;i<=b-1;i++) { for(...
分类:
其他好文 时间:
2014-10-28 17:02:24
阅读次数:
212
存储空间大小计量单位枚举磁盘空间计算#region 磁盘空间计算 /// ///获取指定驱动器上存储空间的总大小(以字节为单位) /// 示例1:获取C盘上存储空间的总大小 /// Int64 totalSize=CommonLibrary...
const maxm=1e100; maxn=1000001; var f,x,p,c,sum,cost:array[0..maxn] of int64; q:array[0..maxn] of longint; n,i,h,t:longint; fun...
分类:
其他好文 时间:
2014-10-27 19:12:16
阅读次数:
222
var f:array[0..10,0..90,0..600] of int64; a:Array[0..600] of longint; count:array[0..600] of longint; ans:int64; n,m:longint; procedure init;var...
分类:
其他好文 时间:
2014-10-27 19:00:07
阅读次数:
176
unit?uGetTickCount64;
interface
uses?windows;
?function?_GetTickCount64():?Int64;
implementation
type
????LARGE_INTEGER?=?record
??????lowpart??:integer?;
??????highpart?...
分类:
其他好文 时间:
2014-10-26 17:08:25
阅读次数:
407
题目地址:Ural 2018
简单DP。用滚动数组。
代码如下:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define LL __int64
const int INF...
分类:
其他好文 时间:
2014-10-25 15:55:34
阅读次数:
186