上一页 1 ··· 140 141 142 143 144 145 146 147 148 ··· 300 下一页
2013年9月2日

UVA 10404 Bachet's Game(dp + 博弈?)

摘要: Problem B: Bachet's Game Bachet's game is probably known to all but probably not by this name. Initially there are n stones on the table. There are two players Stan and Ollie, who move alternately. Stan always starts. The legal moves consist in removing at least one but not more than k stone 阅读全文
posted @ 2013-09-02 17:55 you Richer 阅读(235) 评论(0) 推荐(0)

在mysql数据库中关于日期时间字段的处理

摘要: 在mysql数据库中关于日期时间字段的处理 在开发中,日期时间字段一般有如下几种设计 假设要获取2013-08-15日到2013-08-16日之间的记录 1. 直接使用日期时间类字段相关sql语句如下select * from cms_news where news_add_time between str_to_date("2013-08-15 00:00:00",'%Y-%m-%d %H:%i:%s') and str_to_date("2013-08-16 23:59:59",'%Y-%m-%d %H:%i:%s') 阅读全文
posted @ 2013-09-02 17:53 you Richer 阅读(408) 评论(0) 推荐(0)

[置顶] 2013暑假总结-廊坊人才人事档案管理软件

摘要: 整个暑假以大部分学习英语基础上,自己还参与这人事档案管理软件的开发与客户的交流。 廊坊人事档案管理软件是我刚开始学习B/S牛腩时,米老师给我们的安排的锻炼的项目,主要是以项目驱动带动学习的,促进学习的效率与短时间内对新知识的理解与运用。下面与大家分享学习收获:客户交流的能力 我们和客户至少交流了4、5次,但是每次面对客户的项目的需求表更,如何应对呢?老师一开始就和我们了说了:文档。 那个时候没有经验,以为什么都能记得住、跟客户交流的通,也没有严格按照老师的要求去做,到后来客户需求变更大了,我们与客户交的时候发现:他们会不认可她们以前的需求等(还好我们有录音),之间交流起来有点小问题了,越来越. 阅读全文
posted @ 2013-09-02 17:50 you Richer 阅读(174) 评论(0) 推荐(0)
2013年9月1日

hdu 4465 Candy(2012 ACM-ICPC 成都现场赛)

摘要: 简单概率题,可以直接由剩余n个递推到剩余0个。现在考虑剩余x个概率为(1-p)的candy时,概率为C(2 * n - x, x) * pow(p, n + 1) *pow(1 - p, n - x);在写出x - 1的情况,就可以发现组合数可以直接递推,所以可以直接求。但是考虑到p可能很小,n可能很大,这样的话直接用pow函数会丢失精度,我们可以把double类型写成log10的形式,这样可以保存精度。#include#include#include#include#include#include#include#include#include#include#include#includ. 阅读全文
posted @ 2013-09-01 20:37 you Richer 阅读(163) 评论(0) 推荐(0)

进程管理

摘要: 一 进程相关概念 进程:数据处理,管理数据,对数据进行计算。独占资源,数据处理,一个进程可以有多个线程,也可以没有;线程:依附于进程运行,也是处理数据。线程之间共享资源;一个线程中不能有进程,而且线程中不允许有线程;可以启动多个线程,但每次执行的结果不一样二 查看进程相关命令 1.ps[root@client01 ~]# ps PIDTTY TIME CMD 1157pts/0 00:00:00 bash 1600pts/0 00:00:00 ps#ps -ef包括的进程有:前台进程、后台进程、多个终端运行的进程[root@client01 ~]# ps -ef ... 阅读全文
posted @ 2013-09-01 20:34 you Richer 阅读(249) 评论(0) 推荐(0)

hdu 4472 Count (2012 ACM-ICPC 成都现场赛)

摘要: 递推,考虑到一n可以由i * j + 1组合出来,即第二层有j个含有i个元素的子树。。。然后就可以了。。#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define FF(i, a, b) for(int i=a; i=b; i--)#define REP(i, n) for(int i=0; i> n) { cout << "Case " < 阅读全文
posted @ 2013-09-01 20:32 you Richer 阅读(158) 评论(0) 推荐(0)

poj 3280 Cheapest Palindrome ---(DP 回文串)

摘要: 题目链接:http://poj.org/problem?id=3280思路: dp[i][j] :=第i个字符到第j个字符之间形成回文串的最小费用。dp[i][j]=min(dp[i+1][j]+cost[s[i-1]-'a'],dp[i][j-1]+cost[s[j-1]-'a']);if(s[i-1]==s[j-1]) dp[i][j]=min(dp[i+1][j-1],dp[i][j]); 注意循环顺序,我觉得这题就是这里是tricky:#include#include#include#includeusing namespace std;const in 阅读全文
posted @ 2013-09-01 20:30 you Richer 阅读(203) 评论(0) 推荐(0)

日志管理

摘要: 一 日志相关文件#很关键[root@client01 ~]# ls /var/log/anaconda.ifcfg.log anaconda.xlog btmp dmesg maillog secure wtmpanaconda.log anaconda.yum.log btmp-20130805 dmesg.old maillog-20130805 secure-20130805 yum.loganaconda.program.log audit ... 阅读全文
posted @ 2013-09-01 20:28 you Richer 阅读(478) 评论(0) 推荐(0)

poj3126解题报告

摘要: 题意:简单的说就是:有一个人门牌号是一个四位数的整数,并且还是一个素数,现在他想要换成另外一个四位数且是素数的门牌号,而且,每次都只能更换这个四位数的一个位置的数 ,也就是每换一次都只改变一个数字,而且对于这个每换一个位置的数字就要花费一个单位的价格,那么,为了节约,问他从现在的这个门牌号换到想要的那个门牌号最少要多少次(也就是最少花费)题意很明确,最少次数用bfs,菜鸟刚做搜索觉得难点在于处理每一个四位数的整数变化过程这里我们把这个四位数的整数拆开成一个 a[4]的数组,sum就是这个数的大小,那么bfs访问过程中就是要对于sum这个整数的1~4个位置用别的数字(0~9这9个数字)看能否替换 阅读全文
posted @ 2013-09-01 20:26 you Richer 阅读(193) 评论(0) 推荐(0)

hdu 4454 Stealing a Cake(三分法)

摘要: 给定一个起始点,一个矩形,一个圆,三者互不相交。求从起始点->圆->矩形的最短距离。自己画一画就知道距离和会是凹函数,不过不是一个凹函数。按与水平向量夹角为圆心角求圆上某点坐标,[0, PI] , [PI, 2*pi]两个区间的点会有两个凹函数。所以要做两次三分才行。#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define FF(i, a, b) for(int i=a; i=b; i--)#defin 阅读全文
posted @ 2013-09-01 20:23 you Richer 阅读(193) 评论(0) 推荐(0)
上一页 1 ··· 140 141 142 143 144 145 146 147 148 ··· 300 下一页