continue 直接写在函数里面的后果$a = 4;for($i=0;$i'; for($ii=0;$ii"; continue; }}for($i=0;$i'; for($ii=0;$ii"; aaa(); }}function aaa(){ ...
分类:
其他好文 时间:
2014-07-02 23:18:42
阅读次数:
206
Time Limit: 5000MS Memory limit: 65536K题目描写叙述Haveyou ever played a popular game named "Fruit Ninja"?Fruit Ninja (known as Fruit Ninja HD on the iPad a...
分类:
其他好文 时间:
2014-07-02 22:36:05
阅读次数:
309
这个是约瑟夫的另一个变型,变为总共有2*k个人,先是K个好人后是k个坏人,要求前k次都要杀坏人,即在杀掉第一个好人之前就要把所有的坏人都杀光,所以需要我们求出满足这个条件的最小的m值;
由约瑟夫的递归模型可以发现,我们因为他的递归是从最后杀的人递归到原有的人数,所以我们可以吧顺序反过来,等价于最后杀掉k个坏人,再杀好人,这样在递归的时候就是先知道起始位置(先杀的人),这样就能迭代,由有好人...
分类:
其他好文 时间:
2014-07-02 08:55:40
阅读次数:
188
【C# Common Keyword II】1、as运算符用于在兼容的引用类型之间执行某些类型的转换。 class csrefKeywordsOperators { class Base { public override string ToSt...
分类:
其他好文 时间:
2014-07-01 18:38:21
阅读次数:
155
做完这道题,只能说基本功很重要,数组中套数组就不会用了,过几天吧1做了,看自己到底等没。https://oj.leetcode.com/problems/binary-tree-level-order-traversal-ii/import java.util.*;/** * Definition ...
分类:
编程语言 时间:
2014-07-01 13:30:53
阅读次数:
300
题目:Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For ...
分类:
其他好文 时间:
2014-07-01 12:26:07
阅读次数:
215
题目
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.
Follow up:
Can you solve it without using extra space?
方法
public ListNode de...
分类:
其他好文 时间:
2014-07-01 11:30:58
阅读次数:
200
微软近期Open的职位:JOB TITLE: Software Design Engineer IIDEPARTMENT: Microsoft Office Division ChinaIMMEDIATE SUPERVISOR: Development LeadLocation: Beijing, ...
分类:
其他好文 时间:
2014-07-01 10:29:30
阅读次数:
299
题目
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it...
分类:
其他好文 时间:
2014-07-01 06:23:24
阅读次数:
334
Stage II过程分析
在Stage II中使用到了一些比较重要的数据结构,这里先对这些数据结构来进行下分析:
typedef struct global_data {
bd_t *bd;
unsigned long flags;
unsigned long baudrate;
unsigned long have_console; /* serial_init() was cal...
分类:
其他好文 时间:
2014-07-01 06:16:16
阅读次数:
371