题意:long long data[250001];void A( int st, int nd ) { for( int i = st; i \le nd; i++ ) data[i] = data[i] + (i - st + 1); }void B( int st, int nd ) { fo...
区间最小值(2)
Time Limit : 3000/1000ms (Java/Other) Memory Limit : 65535/32768K (Java/Other)
Total Submission(s) : 26 Accepted Submission(s) : 9
Font: Times New Roman | Verdana | Georgia
Fo...
分类:
编程语言 时间:
2015-08-10 20:10:49
阅读次数:
164
1.从mysql网站下载mysql-5.7.7-rc-winx64.zip;
2.将mysql-5.7.7-rc-winx64.zip解压到相应的安装目录中(例如:D:\dev_tools目录下);
3.将D:\dev_tools\mysql-5.7.7文件加下的my-default.ini文件命名为my.ini;
4.修改my.ini文件(不修改也可以):
# Fo...
分类:
数据库 时间:
2015-08-09 17:14:23
阅读次数:
156
The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font fo...
分类:
其他好文 时间:
2015-08-09 16:53:52
阅读次数:
154
这两天学习了一下php的正则表达式,整理一下。
1.较为常用的元字符:"+","*","?"
+:要求其前导字符必须在目标对象中连续出现一次或者多次
*:要求其前导字符必须在目标对象中出现零次或者连续多次
?:要求其前导对象必须在目标对象中出现零次或者一次
/fo+/
上述正则表达式中含有"+",表示可以与目标对象中
的"fool","fo","football"等在字母f后...
分类:
Web程序 时间:
2015-08-09 00:29:58
阅读次数:
116
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-08-09 00:17:57
阅读次数:
86
int pid = fork();
if(pid > 0){
printf("parent: child=%d\n", pid);
pid = wait();
printf("child %d is done\n", pid);
} else if(pid == 0){
printf("child: exiting\n");
exit();
} else {
printf("fo...
分类:
其他好文 时间:
2015-08-08 00:05:22
阅读次数:
120
poj 1426 的传送门
题目大意:给你一个数,让你找能够整除这个数的而且只含有0和1 的数,比如说
input :3;
output : 111;
可能有多个答案,只需要输出一个即可;
解题思路:用dfs搜索,只搜关于0和1 的数,详情见代码,,,,上代码:#include using namespace std;
bool fo;
void dfs(unsigne...
分类:
其他好文 时间:
2015-08-06 13:26:26
阅读次数:
126
问题:
import urllib.request
import sys
resp=urllib.request.urlopen("http://www.baidu.com")
html=resp.read()
fo=open("test.html","w")
fo.write(html)
fo.close()
Python 保存网页,后出现如下错误
...
分类:
Web程序 时间:
2015-08-06 13:19:21
阅读次数:
174
有一些任务, 可能事先需要设置, 事后做清理工作. 对于这种场景, python的with语句提供了一种非常方变的处理方式, 一个很好的例子是文件处理. 你需要获取一个文件的句柄, 从文件中读取数据, 然后关闭文件句柄. 如果不用with语句, 代码如下:file = open("/tmp/fo.....
分类:
编程语言 时间:
2015-08-05 00:30:50
阅读次数:
226