- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 pat考试-1138
Postorder Traversal (25) 时间限制 600 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Suppose that all the keys in a binary tree are distinct positive integers. Given the preorder and
2017-12-10 15:12:44 235
原创 pat考试-1137
Final Grading (25) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue For a student taking the online course “Data Structures” on China University MOOC (http://www.icourse16
2017-12-10 09:43:42 932
原创 pat考试-1136
A Delayed Palindrome (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Consider a positive integer N written in standard notation with k+1 digits ai as ak…a1a0 with 0
2017-12-10 09:39:49 370
原创 pat考试总结
只能测出自己的基础编程能力太差,像是前两题都写出来了,就差那么一点点,有测试用例过不去的时候就要想特殊数据了,但是考场上的紧张气氛,又找不到,总是怀疑出在自己写的程序上,我觉得一定要在前几题上提高速度,后面才能做完,出现测试样例过不去,一定要稳下心来想一想,有哪个情况自己的程序没遍历到。。
2017-12-10 09:33:27 1076
原创 pat1103
Integer Factorization (30) The K-P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program to find the K-P factoriz
2017-12-08 21:56:15 348
原创 快速排序
每次都调这个快排代码到死,现在就只想记住代码就行#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int N = 100005;void QuickSort(int arr[],int start,int end){ if(start >
2017-12-08 17:23:42 105
转载 hdu1010(DFS + 奇偶剪枝)
Tempter of the BoneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 132730 Accepted Submission(s): 35701Problem Description The doggie found
2017-12-02 23:53:19 172
转载 堆排序
1: 先将待排序的数视作完全二叉树(按层次遍历顺序进行编号, 从0开始),如下图:2:完全二叉树的最后一个非叶子节点,也就是最后一个节点的父节点。最后一个节点的索引为数组长度len-1,那么最后一个非叶子节点的索引应该是为(len-1)/2.也就是从索引为2的节点开始,如果其子节点的值大于其本身的值。则把他和较大子节点进行交换,即将索引2处节点和索引5处元素交换。交换后的结果如图:建堆从最后一个非叶
2017-12-02 21:09:42 133
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人