2011年7月28日

摘要: 另一篇有用的时间函数:http://hi.baidu.com/%BD%A3%BE%B2%B7%E3/blog/item/598fd1c6a59f630e0ef477d3.html(哥的百度空间,不过以后就用这个了)1、sql: localtime和now()返回当前日期与时间:2011-2-26 13:28:43 curtime()返回当前时间:13:28:43 curdate()返回当前日期:20112、sql: date('2011-03-23')返回表达式中的日期:2011-03-23 hour(time) 返回time中的小时 hour(10:23:12)返回10;se 阅读全文
posted @ 2011-07-28 17:33 ljfbest 阅读(269) 评论(0) 推荐(0)
摘要: 又是简单的搜索题,不过我的代码能力太差了,一道题,只是写代码就花了哥很长时间去调试,~\(≧▽≦)/~啦啦啦http://59.69.128.200/JudgeOnline/problem.php?pid=58#include <iostream> #include<cstdio> #include <queue> #include<string.h> using namespace std; int si,sj,ei,ej; int dir[][2]={{0,1},{0,-1},{1,0},{-1,0},{1,1},{1,-1},{-1,1}, 阅读全文
posted @ 2011-07-28 17:19 ljfbest 阅读(90) 评论(0) 推荐(0)
摘要: #include <iostream> #include<cstdio> #include <queue> #include<string.h> using namespace std; const int N=210; bool mark[N][N]; char s[2*N],s1[N],s2[N]; int len,len1,len2,flag; void dfs(int i,int j,int k) { if (k>=len) {flag=true;return ;} if (mark[i][j]) return ; else mar 阅读全文
posted @ 2011-07-28 14:41 ljfbest 阅读(58) 评论(0) 推荐(0)
摘要: 讲的是一个小狗陷入一个迷宫,要求在指定的时间到达目的地,且不能走已经走过的路……本题也可以广搜,前面用广搜写了几道题,这次练练深搜吧...#include <iostream> #include<cstdio> #include <queue> #include<string.h> using namespace std; int n,m,t,si,sj,di,dj; char map[15][15]; bool flag; int dir[][2]={{0,1},{0,-1},{1,0},{-1,0}}; void dfs(int ii,int 阅读全文
posted @ 2011-07-28 11:09 ljfbest 阅读(67) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> char str[100000]; char str1[100000]; char str2[200000]; int next[100000]; void getNext(int m) { int i=1,j=0; while(i<m) { if(j==0||str1[i]==str1[j]) { i++,j++; if(str1[i]==str1[j]) next[i]=next... 阅读全文
posted @ 2011-07-28 09:08 ljfbest 阅读(86) 评论(0) 推荐(0)
摘要: 南阳理工NYOJ这是我们学校自己的oj 希望acmer观摩下;本题同上一篇文章一模一样……水池数目时间限制:3000ms | 内存限制:65535KB难度:4描述南阳理工学院校园里有一些小河和一些湖泊,现在,我们把它们通一看成水池,假设有一张我们学校的某处的地图,这个地图上仅标识了此处是否是水池,现在,你的任务来了,请用计算机算出该地图中共有几个水池。输入第一行输入一个整数N,表示共有N组测试数据每一组数据都是先输入该地图的行数m(0<m<100)与列数n(0<n<100),然后,输入接下来的m行每行输入n个数,表示此处有水还是没水(1表示此处是水池,0表示此处是地面) 阅读全文
posted @ 2011-07-28 08:37 ljfbest 阅读(105) 评论(0) 推荐(0)

导航