03 2015 档案
摘要:#include#include#include#include#includeusing namespace std;#define MAXN 9999#define MAXSIZE 10#define DLEN 4class BigNum{private: int a[500]; /...
阅读全文
摘要:给定n个模式串在主串中出现了几个#include #include const int MAXPT=500007; //最大节点数const int size=26; //子节点数const char start='a'; //子节点标号对应关系 class Ac_Automat{pr...
阅读全文
摘要:#include#include#include#includeusing namespace std ;const int maxn=100020;const int inf=0x3f3f3f3f;int dp[maxn];int a[maxn];int n;int LIS(int a[],in...
阅读全文
摘要:判断一个数是不是素数:bool prime(int n){ if(n==0||n==1) return false; if(n==2) return true; for(int i=2;i#include #include const int maxn = 1000001;int ...
阅读全文
摘要:__builtin_ffs(x) 返回右起第一个‘1’的位置。__builtin_clz(x) 返回左起第一个‘1’之前0的个数。__builtin_ctz(x) 返回右起第一个‘1’之后的0的个数。__builtin_popcount(x...
阅读全文

浙公网安备 33010602011771号