码迷,mamicode.com
首页 >  
搜索关键字:AC    ( 12438个结果
centos6.5 nginx+php+mysql之nginx安装
一.安装makeyum-yinstallgccautomakeautoconflibtoolmake二.安装g++yum-yinstallgccgcc-c++三.安装pcrecd/usr/local/src/用网页打开ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/查看pcre版本wgetftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.35...
分类:数据库   时间:2015-03-09 19:21:15    阅读次数:226
快速求解GCD的三个Trick
【快速求解GCD的三个Trick】1、(ma,mb)=m(a,b)。 2、若(a,b)=1,则(ac,b) = (c,b)。 3、(a^n,b^n)=(a,b)^n
分类:其他好文   时间:2015-03-09 18:46:31    阅读次数:122
HDU 5174
题意有点不明白,因为MAX为int最大值,推测为64位,AC#include #include #include #include #include #define LL __int64using namespace std; const LL MAX=2147483647;cons...
分类:其他好文   时间:2015-03-09 12:40:27    阅读次数:156
【块状树】【树链剖分】【线段树】bzoj3531 [Sdoi2014]旅行
离线后以宗教为第一关键字,操作时间为第二关键字排序。块状树,线下ac,线上tle……#include#include#include#include#includeusing namespace std;queueq;int f,c;inline void R(int &x){ c=0;f=1...
分类:其他好文   时间:2015-03-09 08:11:54    阅读次数:203
URAL 1718. Rejudge 题意讲解
题意:oj管理员发现一道题目的数据出错了。这道题原来有7组数据。管理员删去了第6组,又新增了10组。然后进行rejudge,判断最多和最少有几个人的outcome,也就是判题结果 会改变。 输入n,代表有n次提交。然后是提交人的ID,然后是判题结果,除了AC或者CE,结果会多一个数字,代表在第几组数据里出错。 因为开始只有7组数据,所以原始的TL WA ML这些错误只可能错在1-7 这些数据里。 注意如果是数字改变也算是结果改变了。...
分类:其他好文   时间:2015-03-08 21:36:31    阅读次数:136
PAT:1064. Complete Binary Search Tree (30) AC
#include#includeusing namespace std;const int MAX=1010;int n;int arr[MAX]; //存放原始数组int arrI=0;int CBT[MAX]; //二叉排序树层序遍历序列【思维】中序遍历在数组中存放的就是层序...
分类:其他好文   时间:2015-03-08 18:40:53    阅读次数:132
hdu 1849 Rabbit and Grass 谁都喜欢刷水题。。尼姆博弈
大学时光是浪漫的,女生是浪漫的,圣诞更是浪漫的,但是Rabbit和Grass这两个大学女生在今年的圣诞节却表现得一点都不浪漫:不去逛商场,不去逛公园,不去和AC男约会,两个人竟然猫在寝食下棋…… 说是下棋,其实只是一个简单的小游戏而已,游戏的规则是这样的: 1、棋盘包含1*n个方格,方格从左到右分别编号为0,1,2,…,n-1; 2、m个棋子放在棋盘的方格上,方格可以为空,也可以放多于一个的棋子; 3、双方轮流走棋; 4、每一步可以选择任意一个棋子向左移动到任意的位置(可以多个棋子位于同一个方格),当然,任...
分类:其他好文   时间:2015-03-08 17:17:30    阅读次数:171
BZOJ 2938 Poi2000 病毒 AC自动机+拓扑排序
题目大意:给定n个01串,问是否存在一个无限长的01串,不包含这n个01串中的任何一个 建出Trie图之后判环即可 我这傻逼一开始居然跑了一个DFS去判环23333 #include #include #include #include #define M 30300 using namespace std; int n; char s[M]; namespace Aho_Coras...
分类:编程语言   时间:2015-03-08 17:12:03    阅读次数:167
PAT:1053. Path of Equal Weight (30) AC
#include#include#include#includeusing namespace std;const int MAX=1010;int n,m; //n个节点,m个非叶子节点 long long int S; //待测权值long long int weight[M...
分类:其他好文   时间:2015-03-08 16:56:00    阅读次数:177
UVA 11468(Substring-AC自动机上dp)[Template:AC自动机]
Substring Given a set of pattern strings, and a text, you have to find, if any of the pattern is a substring of the text. If any of the pattern string can be found in text, then print “yes”, othe...
分类:其他好文   时间:2015-03-08 15:45:57    阅读次数:225
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!