/*Input输入数据有多组,每组占一行,包括两个整数m和n(100#includeint main(){int m,n,k,ge,shi,bai;int flag=0;while(scanf("%d%d",&m,&n)!=EOF){ flag=0; if(m>n || m999) ...
分类:
其他好文 时间:
2014-07-06 13:41:48
阅读次数:
196
templateint binarySearch(const vector &a, const comparable &x){ int low = 0, high = a.size() - 1; while(low a[center]) low = center ...
分类:
其他好文 时间:
2014-07-06 13:10:01
阅读次数:
188
Swift学习——使用if和switch来进行条件操作,使用for,while,和do-while来进行循环
//switch支持任意类型的数据以及各种比较操作——不仅仅是整数以及测试相等
//注意如果去掉default程序会报错
let strings = "hello3"
switch strings{
case "hello1":
let stringsCo...
分类:
其他好文 时间:
2014-07-06 12:41:35
阅读次数:
186
这题就是个大数减一的题,减一下就能过,n=1时要特殊处理下
#include
#include
char arr[1002];
int main()
{
int t, len, jie;
scanf("%d", &t);
while(t--){
scanf("%s", arr);
len = strlen(arr);
if(len == 1 && arr[0...
分类:
其他好文 时间:
2014-07-06 12:39:34
阅读次数:
191
import java.util.TimerTask;
/**
* 实现定时任务
*
*/
public class MyTimerTask extends TimerTask {
@Override
public void run() {
int num = 0;
while (num < 3) {
num++;
System.out.println(num ...
分类:
其他好文 时间:
2014-07-06 09:01:18
阅读次数:
219
环境:VS2010
微软官方解释:
Visual C++ Concepts: Building a C/C++ ProgramCompiler Warning (level 1) C4627Error Message
”: skipped when looking for precompiled header use
While searching for the location w...
分类:
其他好文 时间:
2014-07-06 08:22:37
阅读次数:
169
Basic Memory Management
基础内存管理
If you're writing an application for Mac OS X, you have the option to enable garbage collection. In general, this means that you don't have to think about memory management until you get to more complex cases.
如果你正在写运行在...
分类:
其他好文 时间:
2014-07-06 00:58:44
阅读次数:
275
执行启动nginx:/usr/local/nginx/sbin/nginx
错误:/usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
查找:[roo...
分类:
其他好文 时间:
2014-07-06 00:11:52
阅读次数:
205
题意:求/直线的对称矩阵最大多大
思路:DP 每个点就是了
#include
#include
#include
#include
using namespace std;
const int MAXN = 1200;
int dp[MAXN][MAXN];
char str[MAXN][MAXN];
int n;
int main() {
while (scanf("%d", ...
分类:
其他好文 时间:
2014-07-06 00:10:36
阅读次数:
291
f = open("foo.txt") # 返回一个文件对象line = f.readline() # 调用文件的 readline()方法while line: print line, # 后面跟 ',' 将忽略...
分类:
编程语言 时间:
2014-07-05 21:24:54
阅读次数:
287