上一页 1 2 3 4 5 6 7 8 ··· 22 下一页
摘要: E. Rock, Paper, Scissors time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Alice and Bob ha 阅读全文
posted @ 2020-09-29 17:11 Cruel_King 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 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 matrix 阅读全文
posted @ 2020-06-30 00:18 Cruel_King 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1104 Sum of Number Segments (20分) Given a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, given the s 阅读全文
posted @ 2020-06-29 23:17 Cruel_King 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 1026 Table Tennis (30分) A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if the 阅读全文
posted @ 2020-06-26 23:23 Cruel_King 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1091 Acute Stroke (30分) One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in 阅读全文
posted @ 2020-06-24 23:54 Cruel_King 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 1095 Cars on Campus (30分) Zhejiang University has 8 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers 阅读全文
posted @ 2020-06-23 23:29 Cruel_King 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 1098 Insertion or Heap Sort (25分) According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted o 阅读全文
posted @ 2020-06-22 21:39 Cruel_King 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 记录一下自己理解的堆和堆排序吧。 堆是一种类似于完全二叉树的树形结构,对于二叉树中所有非叶子节点,如果根节点的值严格大于其两个儿子的值,则称为 大顶堆,反之称为小顶堆。 堆排序的一般步骤: 首先利用已有的数据构造一个堆,大顶堆增序,小顶堆降序。 将堆顶的元素与堆末元素交换,接着重新调整剩下的元素为一 阅读全文
posted @ 2020-06-22 20:26 Cruel_King 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 1089 Insert or Merge (25分) According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output l 阅读全文
posted @ 2020-06-21 19:10 Cruel_King 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1088 Rational Arithmetic (20分) For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, 阅读全文
posted @ 2020-06-20 21:45 Cruel_King 阅读(247) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 22 下一页