#include#includeusing namespace std;typedef long long ll; //【skill】重命名struct num{ ll zi,mu; //分子分母};ll gcd(ll a,ll b) //求最大公约数{ return ...
分类:
其他好文 时间:
2015-03-11 16:33:00
阅读次数:
145
http://baike.baidu.com/search?word=%E5%8C%97%E4%BA%AC%E5%88%98%E5%BF%83%E8%AF%AD%E4%B8%B0%E8%83%B8%E8%8C%B6 从技术的角度来看,NAND Flash闪存介质虽然存在擦写次数寿命的问题,但是,配....
分类:
其他好文 时间:
2015-03-11 14:39:51
阅读次数:
197
首先对2^64取模的话,可以直接用unsigned long long,这样溢出部分就是取模后的结果了
方法类似POJ2778传送门
只不过这里要统计长度不超过m的方案
我们先统计出长度为m的所有方案,然后减去不包含这些串的方案,剩下就是至少包含一个串的方案了
设转移矩阵为A
相当于sum = A + A^2 + … A^m
f(m) = f(m / 2) * (1 + A...
分类:
其他好文 时间:
2015-03-11 12:56:13
阅读次数:
139
#include#include#includeusing namespace std;const int MAX=1010;int n,m,k; //城市数,高速公路数,查询次数int DELETE; //要删除的点vector ADJ[MAX]; //邻...
分类:
其他好文 时间:
2015-03-11 10:43:07
阅读次数:
140
#include#include#include#includeusing namespace std;bool check(char a) //判断是否为有效字符{ if(isdigit(a) || isalpha(a)) return true; return fal...
分类:
其他好文 时间:
2015-03-11 00:34:32
阅读次数:
193
#include#includeusing namespace std;const int MAX=0x3fffffff;int main(){ int m,n; map count; //数字与出现次数的map映射 scanf("%d%d",&m,&n); for(int i...
分类:
其他好文 时间:
2015-03-11 00:26:16
阅读次数:
148
Description
It’s well known that DNA Sequence is a sequence only contains A, C, T and G, and it’s very useful to analyze a segment of DNA Sequence,For example, if a animal’s DNA sequence contains segm...
分类:
其他好文 时间:
2015-03-10 23:18:27
阅读次数:
201
数列特征
【AC代码】:
#include
#include
using namespace std;
#define MAX 10000+10
int main()
{
int n = 0, i = 0;
int num[MAX];
cin >> n;
for (i = 0; i > num[i];
int mmin = num[0], mm...
分类:
其他好文 时间:
2015-03-10 23:15:45
阅读次数:
179
特殊的数字
【AC代码】:
#include
#include
#include
using namespace std;
int main()
{
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
int i = 0;
for (i = 100; i <= 999; i++)
{
in...
分类:
其他好文 时间:
2015-03-10 23:14:12
阅读次数:
263