摘要:poj1182:食物链 听说是poj中最经典的一道并查集题目。我一做,果然很经典呢!好难啊!!!真的琢磨了很久还弄懂。这道题的重点就在于怎么用并查集表示题目中的关系环。 1. 题干 原题传送门1 原题传送门2 2. 思路详解 实际上,在做这道题之前,我对并查集的了解就只停留在权重选择和压缩路径上。也 阅读全文
posted @ 2020-07-29 16:58 cell_coder 阅读(11) 评论(0) 推荐(0) 编辑
摘要:BOMBLAB实验总结 CSAPP实验BOMB,很头疼,看不懂,勉强做完了。 答案是这样的: Border relations with Canada have never been better. 1 2 4 8 16 32 2 707 7 0 9?>567 4 3 2 1 6 5 在bomb文件 阅读全文
posted @ 2020-06-07 10:56 cell_coder 阅读(30) 评论(0) 推荐(0) 编辑
摘要:CSAPP:datalab实验记录 bitXor 这道题的意思就是限定符号实现异或。我们很容易就知道: $$ a \oplus b = \overline a b + a \overline b $$ 再化简以下(逻辑代数的知识): $$ \overline a b + a \overline b 阅读全文
posted @ 2020-05-15 09:48 cell_coder 阅读(140) 评论(0) 推荐(1) 编辑
摘要:存储器层次结构 存储技术 计算机技术的成功很大程度来源于存储技术的巨大进步。早期的电脑甚至没有磁盘。现在电脑上的磁盘都已经按T算了。 随机访问存储器(Random Access Memory, RAM) 随机访问存储器(Random Access Memory, RAM)分两类: 1. 静态的:SR 阅读全文
posted @ 2020-05-11 17:06 cell_coder 阅读(160) 评论(0) 推荐(0) 编辑
摘要:PAT甲级: 1152 Google Recruitment (20分) 题干 In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture bel 阅读全文
posted @ 2020-05-07 08:34 cell_coder 阅读(60) 评论(0) 推荐(0) 编辑
摘要:PAT甲级: 1136 A Delayed Palindrome (20分) 题干 Look and say sequence is a sequence of integers as the following: where is in [0, 9] except 1. The (n+1)st n 阅读全文
posted @ 2020-05-07 08:27 cell_coder 阅读(36) 评论(0) 推荐(0) 编辑
摘要:PAT甲级: 1136 A Delayed Palindrome (20分) 题干 Consider a positive integer N written in standard notation with k +1 digits a i as a k ⋯ a 1 a 0 with 0≤ a i 阅读全文
posted @ 2020-05-07 08:17 cell_coder 阅读(34) 评论(0) 推荐(0) 编辑
摘要:PAT甲级: 1124 Raffle for Weibo Followers (20分) 题干 John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his followers on 阅读全文
posted @ 2020-05-07 08:10 cell_coder 阅读(39) 评论(0) 推荐(0) 编辑
摘要:PAT甲级:1066 Root of AVL Tree (25分) 题干 An AVL tree is a self balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any 阅读全文
posted @ 2020-05-07 08:03 cell_coder 阅读(37) 评论(0) 推荐(0) 编辑
摘要:PAT甲级: 1025 PAT Ranking (25分) 题干 Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. 阅读全文
posted @ 2020-05-07 07:52 cell_coder 阅读(31) 评论(0) 推荐(0) 编辑