自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

WangXin Programmer

是时候给生活加点料了

  • 博客(64)
  • 资源 (2)
  • 收藏
  • 关注

原创 PAT(贪心)——1045. Favorite Color Stripe (30)

Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cutting off those unwanted pieces and sewing the remaining parts...

2019-01-31 17:36:07 96

原创 PAT(动态规划)——1040. Longest Symmetric String (25)-PAT甲级真题(动态规划)

Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given “Is PAT&TAP symmetric?”, the longest symmetric sub-string is “s PAT&TAP s”, hence ...

2019-01-31 13:39:30 267

原创 PAT(散列)——1084. Broken Keyboard (20)

On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.Now given a string that you are supposed to ...

2019-01-30 14:53:17 127

原创 PAT(散列)——1092. To Buy or Not to Buy (20)-PAT甲级真题

Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of the shop would only sel...

2019-01-30 14:29:46 110

原创 PAT(散列)——1050. String Subtraction (20)

Given two strings S1 and S2, S = S1 – S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to calculate S1 – S2 for any given strings. However, i...

2019-01-30 12:18:10 99

原创 PAT(散列)——1048 Find Coins (25 分)

Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However,...

2019-01-30 12:00:01 189

原创 PAT(dfs)——1103. 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 factorization of N for any positive...

2019-01-30 10:44:25 172

原创 PAT(图)——1076. Forwards on Weibo (30)

Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with followers relations. When a ...

2019-01-29 16:03:49 124

原创 PAT(图)——1072 Gas Station (30 分)

1072 Gas Station (30 分)A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as possible. However it must gu...

2019-01-29 13:23:55 182

原创 【操作系统】——虚拟存储

需求背景计算机系统经常出现内存不够用1. 覆盖技术说明依照程序逻辑结构,将程序划分为若干功能相对独立的模块,将不会同时执行的模块共享同一块内存区域。(必要部分常驻内存、可选部分只在需要时装入内存)评价开发难度增加增加执行时间2. 交换技术说明将暂时不能运行的程序放到外存;换入换出的基本单位:整个进程的地址空间;换出:一个进程的整个地址空间保存到外存;换入:一个进程的...

2019-01-26 11:46:43 601

原创 【操作系统】——物理内存管理

物理内存管理1 连续内存分配1.1 固定分区分配说明在系统初始化阶段,内存被划分为许多静态分区,进程可以被装入大于或等于自身的分区中。评价操作简单,但缺乏灵活性,会产生大量内部碎片,并且当程序太大时,一个分区不足以装入。1.2 动态分区分配说明为把一个进程装入内存,按照一定的分配算法(首次适应,最佳适应,最坏适应,伙伴系统等),从空闲分区中选出一分区分配给该进程;分区是动态创建的...

2019-01-25 16:45:39 557

原创 【操作系统】——计算机启动

计算机启动当计算机加电后,一般不直接执行操作系统,而是执行系统初始化软件完成基本IO初始化和引导加载功能。对于Intel 80386的体系结构而言,PC机中的系统初始化软件是BIOS (Basic Input Output System,即基本输入/输出系统。BIOS实际上是被固化在计算机ROM(只读存储器)芯片上的一个特殊的软件,为上层软件提供最底层的、最直接的硬件控制与支持。启动流...

2019-01-24 21:41:12 173

原创 PAT(图)——1034 Head of a Gang (30 分)

1034 Head of a Gang (30 分)One way that the police finds the head of a gang is to check people’s phone calls. If there is a phone call between A and B, we say that A and B is related. The weight of a ...

2019-01-23 12:26:37 304

原创 PAT(树)——1115 Counting Nodes in a BST (30 分)

1115 Counting Nodes in a BST (30 分)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less...

2019-01-21 20:07:13 364

原创 PAT(树)——1106 Lowest Price in Supply Chain (25 分)

1106 Lowest Price in Supply Chain (25 分)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Startin...

2019-01-21 19:37:38 244

原创 PAT(树)——1102 Invert a Binary Tree (25 分)

1102 Invert a Binary Tree (25 分)The following is from Max Howell @twitter:Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so fu...

2019-01-21 17:33:05 118

原创 PAT(树)——1094 The Largest Generation (25 分)

1094 The Largest Generation (25 分)A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find the generation w...

2019-01-21 16:19:16 99

原创 PAT(树)——1090 Highest Price in Supply Chain (25 分)

1090 Highest Price in Supply Chain (25 分)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starti...

2019-01-21 15:37:51 291

原创 PAT(树)——1086 Tree Traversals Again (25 分)

1086 Tree Traversals Again (25 分)An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered f...

2019-01-21 11:58:39 117

原创 CODECHEF(比赛)——TSEC January Codeathon

最终成绩: 300/600第一题The Speed LimitAll submissions for this problem are available.Chef is travelling to the nearest cricket stadium to watch his favourite team play. Unfortunately for him, he is runnin...

2019-01-20 22:06:19 392

原创 PAT(树)——1079 Total Sales of Supply Chain (25 分)

1079 Total Sales of Supply Chain (25 分)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starting...

2019-01-20 16:36:26 100

原创 PAT(树)——1053 Path of Equal Weight (30 分)

1053 Path of Equal Weight (30 分)Given a non-empty tree with root R, and with weight W​i​​ assigned to each tree node T​i​​ . The weight of a path from R to L is defined to be the sum of the weights ...

2019-01-20 16:06:37 179

原创 PAT(树)——1020 Tree Traversals (25 分)

1020 Tree Traversals (25 分)Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order t...

2019-01-20 13:48:38 160

原创 PAT(图)——1111 Online Map (30 分)

1111 Online Map (30 分)Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is the shortest, and the other ...

2019-01-19 22:02:43 192

原创 PAT(图)——1087 All Roads Lead to Rome (30 分)

1087 All Roads Lead to Rome (30 分)Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happ...

2019-01-19 20:37:49 460

原创 PAT(图)——1030 Travel Plan (30 分)

1030 Travel Plan (30 分)A traveler’s map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a program to help a traveler to de...

2019-01-19 17:13:11 364

原创 PAT(排序)——1083 List Grades (25 分)

1083 List Grades (25 分)Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student reco...

2019-01-18 17:25:58 205 1

原创 PAT(排序)——1075 PAT Judge (25 分)

1075 PAT Judge (25 分)The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist for PAT.Input Specification...

2019-01-18 15:52:57 285

原创 PAT(排序)——1062 Talent and Virtue (25 分)

1062 Talent and Virtue (25 分)About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people’s talent and virtue. According to his theory, a man being outst...

2019-01-18 14:36:28 127

原创 PAT(排序,cin巨坑)——1055. The World’s Richest

1055. The World’s RichestForbes magazine publishes every year its list of billionaires based on the annual ranking of the world’s wealthiest people. Now you are supposed to simulate this job, but con...

2019-01-17 20:31:04 164

原创 PAT(排序)——1028. List Sorting (25)

1028. List Sorting (25)Excel can sort records according to any column. Now you are supposed to imitate this function.InputEach input file contains one test case. For each case, the first line conta...

2019-01-17 17:16:31 102

原创 PAT(排序)——1025 PAT Ranking (25 分)

1025 PAT Ranking (25 分)Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several pla...

2019-01-17 16:18:43 167

原创 PAT(模拟)——1017 Queueing at Bank (25 分)

1017 Queueing at Bank (25 分)Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait...

2019-01-17 11:09:06 242

原创 PAT(进制转换)——1015 Reversible Primes (20 分)

1015 Reversible Primes (20 分)A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime becau...

2019-01-14 22:37:10 124

原创 HDOJ(bfs+优先队列)——1026 Ignatius and the Princess I

题目大意:迷宫问题,已知出发点和终点,求两点之间时间最短的路径,要注意,迷宫中有怪物,走到有怪物的格子要击败怪物,用时等于怪物的血量。题目解析:迷宫问题,马上想到用dfs或bfs,像这种求一条最短路线的就用bfs,由于涉及到不同血量的怪物,我们采用优先队列可以解决这个问题。题目要求输出走过的节点,我们可以定义结构体node,每次记下前驱结点,到终点用一个dfs函数输出沿线坐标;也可以从终点出...

2019-01-14 16:53:17 218

原创 HDOJ(递归)——1012.u Calculate e

Problem DescriptionA simple mathematical formula for e iswhere n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively small values of n.OutputOu...

2019-01-11 16:02:37 339

原创 EOJ(排序)——2945. Search Web Pages

2945. Search Web Pages有 N 个 Web 页面,给每个 Web 页面分配一个相关系数 Vi (Vi为正整数),输出具有最大相关系数的页面,如果具有最大相关系数的页面有多个,那么将这些页面全部输出。输入第 1 行:一个正整数 N(0<N⩽20)第 2 行 ∽ N+1 行:每行包含一个字符串和一个整数 Vi,两者之间用一个空格分隔。字符串表示 Web 页面的 URL...

2019-01-11 12:39:26 465

原创 EOJ(排序)——2890. 询问队员身高

2890. 询问队员身高ECNU 篮球队教练陈老师选拔了一批篮球队员。对于篮球运动,队员身高是重要因素之一,陈老师的记忆力不好,他经常会向助理教练询问身高第 i 高的人是谁。助理教练不胜其烦,想请你帮忙写个程序回答陈老师的询问。备注:每个队员的身高都各不相同。输入第一行是一个整数 t,表示测试数据组数。对于每组测试数据:第一行是两个整数 n,m (1≤n≤50,1≤m≤50),n 表示...

2019-01-11 10:08:26 583

原创 EOJ(排序)——2878. 字串排序

2878. 字串排序在 2010 年百度公司的一次校园招聘笔试中,要求应聘者设计一个 strnumcmp 函数。对比普通的 strcmp 函数,差别在于,当字符串中包含数字时,比较数字大小。数字大小相同或不含数字时,仍然沿用原来的 strcmp 方式。所有不含数字的字符串均小于含数字的字符串。每个字符串的长度范围为 1 ~ 30,而其中包含的数字个数范围为 0 ~ 8,且数字在一个字符串中是连续...

2019-01-11 09:49:07 790 1

原创 EOJ(排序)——2849. 成绩排序

2849. 成绩排序有 n(1⩽n⩽100)个学生的成绩记录,其中包含学号和成绩两项。按照成绩从高到低顺序输出成绩及格(⩾60)学生的学号和成绩。成绩相同时按照学号从小到大顺序输出。输入第 1 行:输入一个整数 n,表示学生记录数。第 2 行 ~ n+1 行:每行是学号(11 位数字)及成绩(0 到 100 之间的整数)。学号和成绩之间有一个空格。输出按要求输出结果,每行输出一个空格...

2019-01-10 21:41:34 673

集体智慧编程中文版

《集体智慧编程》由美国计算机专家西格兰编著,以机器学习与计算统计为主题背景,专门讲述如何挖掘和分析Web上的数据和资源,如何分析用户体验、市场营销、个人品味等诸多信息,并得出有用的结论,通过复杂的算法来从Web网站获取、收集并分析用户的数据和反馈信息,以便创造新的用户价值和商业价值。

2017-09-08

FreeBSD操作系统设计与实现

FreeBSD是一种类UNIX操作系统,是由经过BSD、386BSD和4.4BSD发展而来的Unix的一个重要分支。FreeBSD 为不同架构的计算机系统提供了不同程度的支持。并且一些原来BSD UNIX的开发者后来转到FreeBSD的开发,使得FreeBSD在内部结构和系统API上和UNIX有很大的兼容性。由于FreeBSD宽松的法律条款,其代码被好多其他系统借鉴包括苹果公司的macOS,正因此由于MacOS X的UNIX兼容性,使得macOS获得了UNIX商标认证。

2017-09-08

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除