Sweety

Practice makes perfect

导航

2017年4月25日

摘要: 二分查找 原博: here 1 //二分查找 2 int binarySearch(int arr[], int len, int key) 3 { 4 int left = 0; 5 int right = len - 1; 6 int mid; 7 8 ... 阅读全文

posted @ 2017-04-25 22:08 蓝空 阅读(309) 评论(0) 推荐(0) 编辑

摘要: Binary Tree Restoring Time Limit: 1 Second Memory Limit: 65536 KB Special Judge Given two depth-first-search (DFS) sequences of a bina... 阅读全文

posted @ 2017-04-25 21:47 蓝空 阅读(301) 评论(0) 推荐(0) 编辑

摘要: Yet Another Game of Stones Time Limit: 1 Second Memory Limit: 65536 KB Alice and Bob are playing yet another game of stones. The rules of thi... 阅读全文

posted @ 2017-04-25 16:55 蓝空 阅读(163) 评论(0) 推荐(0) 编辑

摘要: 题意 : 构造尽可能少的一种结构,父节点的值小于等于子节点,而且子节点在序列中出现在父节点后面。而且每个父节点至多有两个子节点。 开始理解错题意了,卡了好半天啊,这道题不是简单的一个节点可以有两个子节点那么简单,而是递归的,也就是说子节点还可以递归存在子节点,也就是可以是树,坑了好半天啊。。。... 阅读全文

posted @ 2017-04-25 16:48 蓝空 阅读(135) 评论(0) 推荐(0) 编辑