码迷,mamicode.com
首页 >  
搜索关键字:treat    ( 94个结果
BNU 4260 Trick or Treat && ZOJ 3386 (三分查找)
代码: #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
Leetcode#191Number of 1 Bits
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
number of 1 bits
题目地址: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
LeetCode – Refresh – Convert Sorted Array to Binary Search Tree
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
LeetCode – Refresh – Binary Tree Post Order Traversal
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加载二进制数据
【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
【BZOJ1589】【USACO 2008 Dec Gold】 1.Trick or Treat on the Farm 基环树裸DP、
没测样例一遍A这真是…… 题意:每个点都有且仅有一个出边(可以出现自环),然后这样一个点出发就会走过且一定走过某些点。 问每个点出发都会走过几个点。 首先这是基环树无疑。 然后就是裸DP了。 这个的关键就是找环,仅此。 #include #include #include #include #define N 101000 using namespace...
分类:其他好文   时间:2015-01-03 09:24:21    阅读次数:138
Excel scientific notation issue
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
94条   上一页 1 ... 6 7 8 9 10 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!