- 博客(65)
- 收藏
- 关注
原创 Linux学习之旅二:设备环境初始化和激活进程0
本系列是学习《Linux内核设计的艺术》等的读书笔记,有理解错误或不当的地方欢迎指出 续接上章,从现在开始执行main函数。当前的操作系统大多数抛弃了init进程,采用systemd启动各种服务,而systemd又是一个大坑,感兴趣的可以往坑里跳。...
2021-12-17 15:17:42
314
原创 Linux学习之旅一:从开机到执行main函数
本系列是学习《Linux内核设计的艺术》等的读书笔记,有理解错误或不当的地方欢迎指出序言 该书选用Linux0.11源代码,虽然源码只有约两万行,但却是一个实实在在,不折不扣的现代操作系统。因为它具有现代操作系统最重要的特征:支持实时多任务,是后续版本的真正鼻祖。 该书出版于2013年,计算机发展到现在也快9年了。当初的软盘早已不见踪影,固态硬盘早已成为电脑的必选硬件。CPU也从当年32位发展成为64位,许许多多的改变让我们对这庞大的系统无从入手。但是从简到繁是更好的...
2021-12-02 19:51:57
1676
原创 (3)E - 二分
It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has decided to use a radiator to make drying faster. But ...
2018-02-27 20:57:55
213
原创 (3)D - 贪心
Given m sequences, each contains n non-negative integer. Now we may select one number from each sequence to form a sequence with m integers. It's clear that we may get n ^ m this kind of sequences. Th...
2018-02-27 20:29:36
202
原创 (3)C - map
You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them. ...
2018-02-27 19:56:07
504
原创 (3)B - 优先队列
A data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data, Internet traffic, financial tickers, on-line auctions, and transaction logs such as Web usage lo...
2018-02-27 19:50:32
182
原创 (3)A - 贪心
Oh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise time interval A..B (1 <= A <= B <= 1,000,000), which includes both times ...
2018-02-27 11:12:23
145
原创 (2)Z - Bitset
Give you a number on base ten,you should output it on base two.(0 < n < 1000) Input For each case there is a postive number n on base ten, end of file. Output ...
2018-02-26 21:20:14
128
原创 (2)X - 栈
As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over t...
2018-02-26 19:41:05
117
原创 (2)W - stl 的 优先队列
Because of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking may cause a little tired, so Sempr always play some games this time. Th...
2018-02-26 19:26:48
240
原创 (2)U - 贪心
A set of n 1-dimensional items have to be packed in identical bins. All bins have exactly the same length l and each item i has length li<=l . We look for a minimal number of bins q such that ...
2018-02-26 18:39:17
166
原创 (2)T - 贪心
The cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 <= N <= 10,000) weeks, the price of milk and labor will fluctuate weekly such that it will cost ...
2018-02-26 18:21:29
109
原创 (2)S - 贪心
A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the moment the s...
2018-02-26 17:35:34
163
原创 (2)R - 贪心
Today the company has m tasks to complete. The ith task need xi minutes to complete. Meanwhile, this task has a difficulty level yi. The machine whose level below this task’s level yi cannot complete ...
2018-02-26 17:07:58
172
原创 (2)Q - 贪心
When playing DotA with god-like rivals and pig-like team members, you have to face an embarrassing situation: All your teammates are killed, and you have to fight 1vN. There are two key attributes fo...
2018-02-26 16:37:13
169
原创 (2)P - 贪心
Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the homework after th...
2018-02-19 23:00:17
148
原创 (2)O - Number Sequence
A single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2...Sk. Each group Sk consists of a sequence of positive integer n...
2018-02-19 22:59:08
200
原创 (2)N - A + B Again
There must be many A + B problems in our HDOJ , now a new one is coming. Give you two hexadecimal integers , your task is to calculate the sum of them,and print it in hexadecimal too. Easy ? AC it !...
2018-02-19 22:41:48
192
原创 (2)M - Prime Friend
Besides the ordinary Boy Friend and Girl Friend, here we define a more academic kind of friend: Prime Friend. We call a nonnegative integer A is the integer B’s Prime Friend when the sum of A and B is...
2018-02-14 00:06:00
329
原创 (2)L - 卡特兰数
As we all know the Train Problem I, the boss of the Ignatius Train Station want to know if all the trains come in strict-increasing order, how many orders that all the trains can get out of the railwa...
2018-02-13 14:01:48
182
原创 (2)K - Big Number
In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are given a number, you h
2018-02-03 14:36:18
248
原创 (2)J - 归并排序求逆序对
One measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence ``DAABEC'', this measure is 5, si
2018-02-03 14:34:01
267
原创 (2)I - Safecracker
=== Op tech briefing, 2002/11/02 06:42 CST ==="The item is locked in a Klein safe behind a painting in the second-floor library. Klein safes are extremely rare; most of them, along with Klein and hi
2018-02-03 14:27:06
228
原创 (2)H - 素数表
The young and very promising cryptographer Odd Even has implemented the security module of a large system with thousands of users, which is now in use in his company. The cryptographic keys are create
2018-02-03 14:18:34
283
原创 (2)G - stl 的 优先队列
In a speech contest, when a contestant finishes his speech, the judges will then grade his performance. The staff remove the highest grade and the lowest grade and compute the average of the rest as t
2018-02-03 14:02:49
300
原创 (2)F - 递推
我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。Input 输入数据的第一行是一个整数C,表示测试实例的个数,然后是C 行数据,每行包含一个整数n(0<n<=10000),表示折线的数量。Output 对于每个测试实例,请输出平面的最大分割数
2018-02-03 13:53:15
208
原创 (2)E - 贪心
FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms. The i-th room contains J[i] pounds of
2018-02-03 13:46:51
143
原创 (2)D - stl 的 map
Once again, James Bond is fleeing from some evil people who want to see him dead. Fortunately, he has left a bungee rope on a nearby highway bridge which he can use to escape from his enemies. His pla
2018-01-30 14:00:57
163
原创 (2)C - stl 的 map
夏天来了~~好开心啊,呵呵,好多好多水果~~ Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了. Input 第一行正整数N(0每组测试数据的第一行是一个整数M(0<M<=100),表示工有M次成功的交易.其后有M行数据,每行表示一次交易,由水果名称(小写字母组成,长度不超过8
2018-01-30 13:50:22
140
原创 (2)B - stl 的 map
gnatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leaves. Now Ignatius want t
2018-01-30 13:32:57
272
原创 (2)A - stl 的 map
Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will cou
2018-01-28 22:16:52
111
原创 Z - A + B Problem II
I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.Input The first line of the input contains an integer T(1<=T<=20) which means the numb
2018-01-28 22:13:12
132
原创 Y - A == B ?
Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO".Input each test case contains two numbers A and B. Output for each case, if A is equal to B, you should pr
2018-01-28 22:11:28
175
原创 X - Specialized Four-Digit Numbers
Find and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexadecimal (base 16) notation and also
2018-01-28 22:02:10
248
原创 W - The Circumference of the Circle
To calculate the circumference of a circle seems to be an easy task - provided you know its diameter. But what if you don't?You are given the cartesian coordinates of three non-collinear points
2018-01-28 21:56:27
961
2
原创 V - The Fun Number System
In a k bit 2's complement number, where the bits are indexed from 0 to k-1, the weight of the most significant bit (i.e., in position k-1), is -2^(k-1), and the weight of a bit in any position i (0 ≤
2018-01-26 00:04:04
154
原创 U - Long Distance Racing
Bessie is training for her next race by running on a path that includes hills so that she will be prepared for any terrain. She has planned a straight path and wants to run as far as she can -- but sh
2018-01-25 23:49:10
210
原创 S - Counterfeit Dollar
Sally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit even though its color and size make it indistinguishable from the re
2018-01-24 23:09:17
204
原创 R - Joseph
The Joseph's problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, . . ., n, standing in circle every mth is going to be executed
2018-01-23 23:04:49
211
原创 Q - 高精度(大数)n次方
Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems.
2018-01-23 22:38:05
1271
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人