代码:
#include
using namespace std;
const double eps=1e-7;
const double inf=0x3f3f3f3f;
const int N=55000;
int n;
struct point
{
double x,y;
}mapp[N];
double dis(point a,point b)
{
return sqrt...
分类:
其他好文 时间:
2015-04-28 21:03:11
阅读次数:
167
publicclassSolution{//youneedtotreatnasanunsignedvaluepublicinthammingWeight(intn){intc=0;while(n>0){c=c+n%2;n=n/2;}if(n==1)returnc+1;elsereturnc;}}Input:2147483648(10000000000000000000000000000000)Output:0Expected:1原因,题目要求int是无符号int型,而java..
分类:
其他好文 时间:
2015-04-28 18:57:10
阅读次数:
98
组合模式的英文原文是:Compose objects into tree structures to represent part-whole hiearachies. Composite lets clients treat individual objects and compositions of objects uniformly. 意思是:将对象组合成树形结构以表示“部分—整体”的层次结...
分类:
其他好文 时间:
2015-04-27 10:00:53
阅读次数:
106
biguanide[ba?'gwɑ?na?d]双胍metformin[m?t'f?rm?n]二甲双胍an antidiabetic drug (trade name Glucophage) prescribed to treat type II diabetes。sulphonylureas [s?...
分类:
其他好文 时间:
2015-04-15 18:28:41
阅读次数:
248
题目地址:https://leetcode.com/problems/number-of-1-bits/解答:public class Solution { // you need to treat n as an unsigned value public int hammingWei...
分类:
其他好文 时间:
2015-04-07 19:14:44
阅读次数:
71
It is kind of binary search. Since this is a sorted array, we can treat it as inorder traversal. And we can define the root node for the Tree.So find ...
分类:
其他好文 时间:
2015-03-19 06:19:48
阅读次数:
105
Still 3 methods:Same with inorder, but post order is a little different. We need to treat it as reverse result of preorder.So we go to right branch fi...
分类:
其他好文 时间:
2015-03-18 08:57:58
阅读次数:
132
【Unity加载二进制数据】 The first step is to save your binary data file with the ".bytes" extension.unitywill treat this file as aTextAsset. As a TextAsset th....
分类:
编程语言 时间:
2015-02-05 21:47:55
阅读次数:
208
没测样例一遍A这真是……
题意:每个点都有且仅有一个出边(可以出现自环),然后这样一个点出发就会走过且一定走过某些点。
问每个点出发都会走过几个点。
首先这是基环树无疑。
然后就是裸DP了。
这个的关键就是找环,仅此。
#include
#include
#include
#include
#define N 101000
using namespace...
分类:
其他好文 时间:
2015-01-03 09:24:21
阅读次数:
138
This is a known issue, you can find more in internet.
Excel will treat text(can display with number) more than 11 numbers, it will convert to scientif...
分类:
其他好文 时间:
2014-12-02 17:03:48
阅读次数:
196