上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页

1105 Spiral Matrix (25 分)螺旋矩阵

摘要: 1105 Spiral Matrix (25 分) This time your job is to fill a sequence of N positive integers into a spiral matrix in non-increasing order. A spiral matri 阅读全文
posted @ 2019-02-14 17:01 ZhangのBlog 阅读(145) 评论(0) 推荐(0) 编辑

1089 Insert or Merge (25 分)

摘要: 1089 Insert or Merge (25 分) According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output 阅读全文
posted @ 2019-02-14 14:47 ZhangのBlog 阅读(538) 评论(0) 推荐(0) 编辑

1044 Shopping in Mars (25 分)二分查找

摘要: 1044 Shopping in Mars (25 分) Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in M 阅读全文
posted @ 2019-02-14 13:33 ZhangのBlog 阅读(138) 评论(0) 推荐(0) 编辑

1068 Find More Coins (30 分)记忆化搜索

摘要: 1068 Find More Coins (30 分) Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a unive 阅读全文
posted @ 2019-02-13 20:53 ZhangのBlog 阅读(1070) 评论(0) 推荐(0) 编辑

1133 Splitting A Linked List (25 分)

摘要: 1133 Splitting A Linked List (25 分) Given a singly linked list, you are supposed to rearrange its elements so that all the negative values appear befo 阅读全文
posted @ 2019-02-13 18:28 ZhangのBlog 阅读(130) 评论(0) 推荐(0) 编辑

1145 Hashing - Average Search Time (25 分)

摘要: 1145 Hashing - Average Search Time (25 分) The task of this problem is simple: insert a sequence of distinct positive integers into a hash table first. 阅读全文
posted @ 2019-02-13 15:31 ZhangのBlog 阅读(122) 评论(0) 推荐(0) 编辑

1147 Heaps (30 分)

摘要: 1147 Heaps (30 分) In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, 阅读全文
posted @ 2019-02-13 14:23 ZhangのBlog 阅读(125) 评论(0) 推荐(0) 编辑

1098 Insertion or Heap Sort (25 分)

摘要: 1098 Insertion or Heap Sort (25 分) According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted 阅读全文
posted @ 2019-02-13 13:22 ZhangのBlog 阅读(160) 评论(0) 推荐(0) 编辑

自测-3 数组元素循环右移问题 (20 分)

摘要: 自测-3 数组元素循环右移问题 (20 分) 一个数组AAA中存有NNN(>0>0>0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移MMM(≥0\ge 0≥0)个位置,即将AAA中的数据由(A0A1⋯AN−1A_0 A_1 \cdots A_{N-1}A​0​​A​1​​⋯A​N−1​ 阅读全文
posted @ 2019-02-08 20:59 ZhangのBlog 阅读(601) 评论(0) 推荐(0) 编辑

自测-1 打印沙漏 (20 分)

摘要: 自测-1 打印沙漏 (20 分) 本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印 ***** *** * *** ***** 所谓“沙漏形状”,是指每行输出奇数个符号;各行符号中心对齐;相邻两行符号数差2;符号数先从大到小顺序递减到1,再从小到大顺序递增;首 阅读全文
posted @ 2019-02-08 20:38 ZhangのBlog 阅读(1058) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页