码迷,mamicode.com
首页 > 其他好文
wust 1419 1419: We Love 01( 计数问题)
1419: We Love 01 Time Limit: 1 Sec  Memory Limit: 128 MB   64bit IO Format: %lld Submitted: 30  Accepted: 7 [Submit][Status][Web Board] Description You have N ‘1’ and M ‘0’. You can use all o...
分类:其他好文   时间:2015-05-22 09:47:32    阅读次数:97
Maven打包中用xpath替换的语法说明
<...
分类:其他好文   时间:2015-05-22 09:47:43    阅读次数:115
POJ 3074 Sudoku 舞蹈链
#include #include #include #include #include #include #include #include #include #include #include #define INF 100000000 using namespace std; #define maxn 10000 #define maxnode 270000 st...
分类:其他好文   时间:2015-05-22 09:50:00    阅读次数:166
poj-2778 DNA Sequence
题意: 给出n个AGCT组成的字符串和一个数m; 求AGCT能组成的长度为m的串的个数; n 题解: 构造一个满足题意的长度为x的串之前,我们要先构筑出一个长度为x-1的串; 显然倘若要让x的符合题意,x-1的必符合题意; 那么既然串的前半部分都已经符合题意了,我们只需要考虑x-1那个串的后缀; 就是说那个后缀再加上一个字符之后,能否满足题意; 而当构造x+1的串时,x的...
分类:其他好文   时间:2015-05-22 09:49:14    阅读次数:161
黑马程序员—io之File的合并(SequenceInputStream)与分割
——Java培训、Android培训、iOS培训、.Net培训、期待与您交流! —— 1:文件的合并SequenceInputStream(读取多个文件,写入一个文件中) 获取Enumeration有两种方式 1.1:Vector ve=new Vector(); Enumeration...
分类:其他好文   时间:2015-05-22 09:47:49    阅读次数:111
POJ 3398 Perfect Service(树形DP,最小支配集)
#include #include #include #include #include #include #include #include #include #include #define LL long long #define FOR(i, x, y) for(int i=x;i<=y;i++) using namespace std; const int MAXN ...
分类:其他好文   时间:2015-05-22 09:47:14    阅读次数:137
设计模式—责任链模式
责任链模式的英文是:Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain util an...
分类:其他好文   时间:2015-05-22 09:48:07    阅读次数:359
杭电ACM1312——Red and Black~~广搜
这一题,简单的广搜或者深搜都可以搞定,时间复杂度都差不多。 我用的是广搜。题目的意思是:@是一个人的起始位置,#不可以走,. 可以走,求出可以走的位置的个数。 一开始没有用结构体来存储坐标,直接用的是z = x * 10 + y;将z入队,结果错了,原因是在取余整除的时候会出错。改用结构体就OK了。 下面是AC的代码: #include #include #include using...
分类:其他好文   时间:2015-05-22 09:47:49    阅读次数:114
2720: 删出多余的空格
Description 小平在给弟弟检查英语作业时时,发现每个英语句子单词之间的空格个数不等,请你编程帮他把句子中多余的空格去掉,使每个单词之间只保留一个空格,首尾的空格也去掉。 部分代码已给定如下,只需要提交缺失的代码。 #include int main() {     void delSpace(char sentence[]);     char sentenc...
分类:其他好文   时间:2015-05-22 09:48:14    阅读次数:106
杭电ACM2187——悼念512汶川大地震遇难同胞——老人是真饿了~~贪心
这一题,简单的贪心就OK了。 下面是AC的代码: #include #include #include using namespace std; class data { public: int price, height; }; int M, N; data Date[1005]; int cmp(const data &a, const data &b) { re...
分类:其他好文   时间:2015-05-22 09:47:46    阅读次数:124
哈理工 1400 汽车比赛
汽车比赛 Time Limit: 1000 MS Memory Limit: 65536 K Total Submit: 388(95 users) Total Accepted: 146(80 users) Rating: Special Judge: No...
分类:其他好文   时间:2015-05-22 09:46:52    阅读次数:107
cocos2d-x“无法打开源文件”
这一周开始学习cocos2d-x,刚开始就碰到了一些问题,新建完工程后,自己给工程添加新的文件,有两种方式: 第一种是使用VS的类向导,让软件帮我们把需要添加的类加入到工程,可以一次把头文件和cpp文件都添加进去,然后我们在HelloWorldScene.cpp的开头使用#include""时,会报出错误提醒“无法打开源文件 **.h”,也就是无法打开我们刚才为工程添加的文件,这是为什么...
分类:其他好文   时间:2015-05-22 09:45:00    阅读次数:155
母函数大模版
//母函数模板 //形如(1+x^1+x^2+x^3+....+x^n)*(1+x^2+x^4+x^6+....+x^n)*......(1+x^m+x^2m+x^3m+....+x^n) #include using namespace std; const int lmax=10000; int c1[lmax+1],c2[lmax+1]; int main() { int n,i,j,...
分类:其他好文   时间:2015-05-22 09:47:04    阅读次数:112
FastDFS tracker 配置详解
本文是 tracker.conf 配置文件的详细介绍。 1 基本配置 disable #func:配置是否生效 #valu:true、false disable=false bind_addr #func:绑定IP #valu:IP地址 bind_addr=192.168.6.102 port #func:服务端口 #valu:端口整数值 port=22122 ...
分类:其他好文   时间:2015-05-22 09:45:21    阅读次数:303
leetcode212:Word Search II
问题描述点此链接 Given a 2D board and a list of words from the dictionary, find all words in the board.Each word must be constructed from letters of sequentially adjacent cell, where “adjacent” cells are tho...
分类:其他好文   时间:2015-05-22 09:47:17    阅读次数:108
FastDFS配置说明
前面了解了fastdfs的原理,接下来就熟悉一下安装过程,准备了三台机器,一台模拟client,一台模拟storage,一台模拟tracker。     三台机器均为debian6,系统为最小化安装,先安装基本编译环境:     apt-get install build-essential php5-dev libevent-dev 下载fastdfs源码包: wget ...
分类:其他好文   时间:2015-05-22 09:43:28    阅读次数:131
poj 1521Entropy(哈弗曼编码)
今天上机课写了这道题,已经是上上周留的作业了,有几天没刷算法题了,哈弗曼编码,贪心求解。。。 思路: 就是建立一个二维数组,一个保存权值w,另一个保存父节点坐标f,然后分别找到权值最小的两个点,生成 一个新的节点加入该数组中,将这两个最小的点从数组中删除一直这样循环,直到找不到两个没有父节点的点为止,就 是说到最后只有一个节点没有父节点。注意输入的字母只有一个的情况,我第一次提交wa就是在...
分类:其他好文   时间:2015-05-22 09:44:06    阅读次数:125
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!