自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

原创 事件驱动复习6

Sometimes functions are not members of a class called global functions (全局函数)Function Definitions with Mutiple Paramenters:function prototype (declaration): int test ( int );function header: int test ( int b ) ;signature: test ( int );cout&

2022-05-18 19:35:57 197

原创 事件驱动复习4、5

Pseudocode ( or “fake” code ) is an artifical and informal language that helps you develop algorithms. 伪代码概念(1)normally describes only executable statements通常仅描述可执行语句(2)Declarations are not executable statements声明不是可执行语句sequrntial execution:(顺序执行)st

2022-05-18 10:48:21 210

原创 事件驱动复习3

Generally, data members should be declared private and member functions should be declared public.set functions also called mutatorsget functions also called accessorsclasses often provide public member functions to allow clients of the class to set or

2022-05-17 20:44:13 185

原创 事件驱动复习1

Three types of instructions :1.Machine languages2.Assembly languages3.High-level languages

2022-05-14 10:23:25 208

原创 事件驱动复习2

A single-line comment //Indent 缩进backslash \ 反斜杠stream extraction operator (using namespace std)standard input stream (std::cin)stream manipulator (std::endl)Fundamental types:int , double , charAdding Integers:1.A variable name is any valid iden

2022-05-14 10:22:52 150

原创 操作系统复习六

Background:Program must be brought (from disk) into memory

2021-12-16 16:43:04 950

原创 操作系统复习五

ch5 Process SynchronisationMotivation:1.Maintaining data consistency requires mechanisms to ensure the orderly execution of cooperating processes.2.Suppose that we want to provide a solution to the consumer-producer problem that fills all buffer slots.

2021-12-15 09:48:41 603

原创 操作系统复习四

ch4 DeadlockDeadlock:A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set.–The system model for deadlocks first requires a process request a resource, then use the resource, and finally

2021-12-14 17:45:22 262

原创 操作系统复习三

Week7磁盘调度What is a Disk?1.A disk is a magnetic storage device which has a number of platters( or surfaces ).2.The entire assembly of platters rotates as a unit at high speeds (typically 5000-10000 RPM for a fixed disk. )3.The surface of each platter i

2021-12-13 17:14:18 231

原创 操作系统复习二

Week5_Lec 1Basic Concepts - Typical Program Behavior–Maximun CPU utilization obtained with multiprogramming–CPU-I/O Burst Cycle: Process execution consists of a cycle of CPU excution and I/O waitCPU Scheduling: Part 1–Selects from among the processes

2021-12-13 10:04:09 398

原创 True Liars POJ - 1417

True Liars POJ - 1417题目:(带权并查集+01背包)After having drifted about in a small boat for a couple of days, Akira Crusoe Maeda was finally cast ashore on a foggy island. Though he was exhausted and despaired, he was still fortunate to remember a legend of the

2021-11-07 21:10:12 300

原创 01背包问题plus

01背包问题plus使用DP时,当第二维体积范围较大时,正常的01背包会超时。因此第二种写法(价值比较小的情况下),我们将dp的对象由体积换成价值。若价值的数据范围也很大,那么此种方法也不适合了。定义dp[i+1][j]为在前i个物品中挑出价值总和为j所需要的最小体积,不存在时则为INF,由前0个物品没有可选的,所以初始化dp[0][0]=0;即初始化时:------------- 1.dp[i][j]=INF;------------- 2.dp[0][0]=0;题目(仅举例)代码:

2021-10-16 20:52:31 236

原创 Bakry and Partitioning

题目 C. Bakry and PartitioningBakry and PartitioningBakry faced a problem, but since he’s lazy to solve it, he asks for your help.You are given a tree of n nodes, the i-th node has value ai assigned to it for each i from 1 to n. As a reminder, a tree on

2021-10-09 21:04:55 225

原创 SDUT 2021 Summer Individual Contest - 6补题

Yet Another Sorting Problem题目:给出一个长度为N+M的序列p,它是(1,2…,N+M)的一个置换。p的第i项是pi。你可以做以下任何次数的操作。在1到N(包括)之间选择一个整数n,在1到M(包括)之间选择一个整数m。然后,交换 pn和pN+m。找出将p按升序排序所需的最少操作数。我们可以证明,有可能对 p 在这个问题的约束条件下,可以按升序排序。限制条件输入的所有数值都是整数。1 ≤ N , M ≤ 10 5 1 ≤ p i ≤ N + M p 是一个 (

2021-08-11 19:22:42 310 1

空空如也

空空如也

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

TA关注的人

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