码迷,mamicode.com
首页 >  
搜索关键字:AC    ( 12438个结果
PAT:1012. The Best Rank (25) AC
#include#includeusing namespace std;struct Student{ int mID; int grade[4]; //0对应平均A,1对应C,2对应M,3对应E}STU[2010];char course[4]={'A','C','M...
分类:其他好文   时间:2015-02-26 01:20:39    阅读次数:133
HDOJ 1248 寒冰王座(找规律)
【思路】:找规律,参考的别人的,自己写的挂了。http://blog.csdn.net/appte/article/details/8227632 【AC代码】: #include #include #include #include using namespace std; int main() { //freopen("in.txt", "r", stdin); ...
分类:其他好文   时间:2015-02-25 09:08:52    阅读次数:180
HDOJ 1234 统计同成绩学生人数(水)(浙大2006研究生复试)
【思路】:纯水。 【AC代码】: #include #include #include #include using namespace std; #define MAX 1000+10 int main() { //freopen("in.txt", "r", stdin); int n = 0; int num[MAX]; while (cin ...
分类:其他好文   时间:2015-02-24 18:43:54    阅读次数:134
HDOJ 1205 吃糖果(数学)
【思路】:把吃糖的行为看成是两两消除的行为,所以如果想全部消除,取决于数量最多的那种。所以得出公式:max - (sum-max)另外:要采用longlong型。 【AC代码】: #include #include #include #include #include #include using namespace std; #define MAX 1000000+10 in...
分类:其他好文   时间:2015-02-24 17:32:01    阅读次数:122
多模匹配-AC与WM算法实测
1 概述 在某海量数据分析系统中,使用AC多模改进算法做多模匹配,作为数据分类和分发的第一道关口。部署时间较长后,内存占用较大,预处理时间随模式串数量的增加呈指数级增长,到达10W条模式串的时候已经无法正常运行。为满足需求,研究算法性能,在AC改进算法无法打成需求的情况下,研究WM匹配算法并进行改....
分类:编程语言   时间:2015-02-24 17:25:07    阅读次数:427
PAT:1013. 数素数 (20) AC
#include#includebool isprime(int num){ int sqr=(int)sqrt(num*1.0); //【skill】判断素数只要判断到开平方就可以了 for(int i=2 ; i=l && cnt=r) break; ...
分类:其他好文   时间:2015-02-24 13:47:35    阅读次数:167
PAT:1007. 素数对猜想 (20) AC
#include#includebool isprime(int num) //判断素数的子函数{ int sqr=(int)sqrt(num*1.0); for(int i=2 ; i<sqr+1 ; ++i) if(num%i==0) return 0; re...
分类:其他好文   时间:2015-02-24 13:45:13    阅读次数:108
Sphinx(Coreseek)安装和使用指南
1.安装1.1安装mmseg./bootstrap # 必须执行,不然安装会失败./configure --prefix=/usr/local/mmseg-3.2.14 #指定安装目录makemake install1.2安装coreseek# 在csft-4.1/configure.ac中# 查找...
分类:其他好文   时间:2015-02-24 12:33:23    阅读次数:190
【HDOJ】1885 Key Task
状态压缩+BFS,一次AC。 1 /* 1885 */ 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 #define MAXN 105 10 11 b...
分类:其他好文   时间:2015-02-23 21:11:31    阅读次数:234
hdu 3371 Connect the Cities Prim + Kruskal两种算法分别AC 水过~~~~
Problem Description In 2100, since the sea level rise, most of the cities disappear. Though some survived cities are still connected with others, but most of them become disconnected. The government wants to build some roads to connect all of these cities ...
分类:编程语言   时间:2015-02-23 17:57:24    阅读次数:271
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!