date_default_timezone_set('PRC') or die('时区设置失败,请联系管理员!'); //设置php的时区,例如使用time函数
mysql_query("SET time_zone = '+8:00'") or die('时区设置失败,请联系管理员!'); //设置mysql的时区,例如使用now函数...
分类:
数据库 时间:
2014-06-05 00:27:46
阅读次数:
329
Follow up for "Unique Paths":Now consider if
some obstacles are added to the grids. How many unique paths would there be?An
obstacle and empty space i...
分类:
其他好文 时间:
2014-06-04 19:54:55
阅读次数:
258
记录3个变量。
sum[i]:当前区间被覆盖2次及两次以上的面积。
num[i]:当前区间被覆盖1次及一次以上的面积。
cover[i]:覆盖的lazy标记。
对于每一个区间.
更新操作如下:
void push_up(int_now)
{
if(cover[rt]==0)
{
num[rt]=num[rt<<1]+num[rt<<1|1];
...
分类:
其他好文 时间:
2014-05-31 17:58:57
阅读次数:
296
DateTime dt = DateTime.Now;//2010年10月4日 17点05分
string str = ""; //str = string.Format("{0:y yy yyy yyyy}", dt); //10 10 2010
2010 //str = String.Form....
分类:
其他好文 时间:
2014-05-31 14:36:51
阅读次数:
208
DescriptionGeorge took sticks of the same
length and cut them randomly until all parts became at most 50 units long. Now
he wants to return sticks to ...
分类:
其他好文 时间:
2014-05-30 23:00:32
阅读次数:
395
对于Git,已经跟踪的文件,再加入到.gitignore中,会使忽略失效。使用下面3个命令使它重新生效git rm -r --cached .git add
.git commit -m ".gitignore is now working." 完成之后push到你的代码库即可。
分类:
其他好文 时间:
2014-05-30 11:43:21
阅读次数:
318
题意:求1-n的n个数字中1出现的个数。解法:数位dp,dp[pre][now][equa]
记录着第pre位为now,equa表示前边是否有降数字(即后边可不能够任意取,true为没降,true为已降);常规的记忆化搜索代码:/***********************************...
分类:
其他好文 时间:
2014-05-30 09:00:21
阅读次数:
232
mysql too many open
connections问题解决方法。原文参考:http://www.jbxue.com/db/10068.html原因主要是:max_connections配置问题导致,它必须在[mysqld]下面才会生效。曾经以为在my.cnf写入max_connectio...
分类:
数据库 时间:
2014-05-30 05:22:53
阅读次数:
319
1 #include //bfs; 2 #include 3 #include 4
#include 5 using namespace std; 6 struct data 7 { 8 int x,y,t; 9 }now,pos; 10
int n,m,t,dis[...
分类:
其他好文 时间:
2014-05-30 01:26:49
阅读次数:
242
Scout YYF ITime Limit: 1000MSMemory Limit:
65536KTotal Submissions: 4452Accepted: 1159DescriptionYYF is a couragous scout.
Now he is on a dangerous mi...
分类:
其他好文 时间:
2014-05-28 19:00:38
阅读次数:
289