首先你要了解经线、纬线。 经线。以地心为原点,通过地球南北两极的连线为经线,两条经线构成一个经线圈,地心是经线圈的中心。两个经线圈之间的角度差就是经度。 纬线。地球上任意一点与地心的连线与赤道平面的夹角为纬度,同一半球表面上,所有纬度相通的点组成的集合就是纬线(圈)。 ...
分类:
其他好文 时间:
2014-07-29 11:28:16
阅读次数:
246
1 public class Solution { 2 public static int lengthOfLongestSubstring(String s) { 3 4 char[] arr = s.toCharArray(); 5 int pre = 0; 6 ...
http://acm.hdu.edu.cn/showproblem.php?pid=1024状态转移方程: dp[j]=max(dp[j-1]+a[j],pre[j-1]+a[j]); 1 #include 2 #include 3 #include 4 #define maxn 100001...
分类:
其他好文 时间:
2014-07-28 23:33:14
阅读次数:
297
HTML代码: 返回 ios下载 Android下载 CSS代码(reset):body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,te...
分类:
移动开发 时间:
2014-07-27 23:25:59
阅读次数:
414
public class Solution { public int climbStairs(int n) { if(n==1) return 1; if(n==2) return 2; int pre=1; int cur=2; ...
分类:
其他好文 时间:
2014-07-27 23:21:39
阅读次数:
382
题意: 给出一个m叉树的前,后序遍历求这样的树有多少种。Solution: 我们知道前序遍历的第一个点一定是根节点,后序遍历的最后一个点一定是根节点。 由此,我们只一要确定对于每一个节点,它有多少个儿子节点,再累乘C(m,k)。code#include #include #in...
分类:
其他好文 时间:
2014-07-27 21:31:25
阅读次数:
225
解题报告
题目传送门
题意:
每天有12节课,一周上7天,一门课在一周有多天上课。求一周最多上几节课。
思路:
把课程看成一个集合,上课的时间看成一个集合,二分图就出来了。
#include
#include
#include
using namespace std;
int n,day[10][15],mmap[500][500],vis[500],cnt,pre[500];...
分类:
其他好文 时间:
2014-07-27 11:24:42
阅读次数:
227
解题报告
题目传送门
题意:
求满足条件的最大集合:集合内任何两个人都没有浪漫关系
思路:
跟POJ2771一样的题,变的简单多了。POJ2771解题报告
#include
#include
#include
#include
using namespace std;
int n,mmap[550][550],pre[550],vis[550];
int dfs(int x)...
分类:
其他好文 时间:
2014-07-27 11:21:32
阅读次数:
212
先上代码:#include #include #include #include using namespace std;int G[1000][1000];int pre[1000],sccno[1000],lowlink[1000]; //sccno[u]:u节点所属于的强连通分量序号...
分类:
其他好文 时间:
2014-07-26 14:21:30
阅读次数:
238
提交时忘记编写日志,事后想在版本库浏览器中编辑日志信息,却弹出错误,“此版本库不允许修改版本属性请管理员创建pre-revprop-change钩子”。解决方法如下: 在版本库的hooks目录中,新建pre-revprop-change.ba...
分类:
其他好文 时间:
2014-07-25 00:11:44
阅读次数:
285