自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 MATLAB学习笔记2(2019.11.30)

特殊函数hold on。为了使前后两次画的图同时存在于一张图上,在第一次执行画图命令后,输入此函数,再执行下一次画图命令就可以了。drawnow。画出当前数据所对应的图。...

2019-11-30 21:30:32 220

原创 MATLAB学习笔记(2019.11.30)

matlab学习笔记学习原因由于已经参加了人生中第一次美赛,马上就要比赛了,又加上今年校内需要淘汰一些队伍而开始的提前模拟,所以现在开始了matlab的学习。由于matlab强大的功能,我想学会使用这个软件对于之后的学习也会有所帮助,于是开始在这里进行笔记的记录。基础知识1.运算符前加上一个小点“.”的原因。(1)当运算的对象是向量、矩阵的时候,加点运算就是对应元素之间的运算,这时要求所...

2019-11-30 18:20:20 1542

原创 PAT A1097 Deduplication on a Linked List (25 分)

Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each value K, only the first node of which the value or a...

2019-08-23 11:49:52 198

原创 PAT A1052 Linked List Sorting (25 分)

A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key and a Next pointer to the next structure. Now give...

2019-08-22 16:23:35 149

原创 codeup 1918 简单计算器

题目描述读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。输入:测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。输出:对每个测试用例输出1行,即该表达式的值,精确到小数点后2位。样例输入:30 / 90 - 26 + 97 - 5 - 6 -...

2019-08-21 22:57:45 262

原创 PAT A1056 Mice and Rice (25 分)

Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given map. The goal of each mouse is to eat as much rice...

2019-08-21 22:28:46 192

原创 priority_queue 优先队列中结构体的优先级设置

如何理解结构体中overload的小于号呢?可以理解为重载后小于号作用是比较出数组中优先级更小的数据,如果返回的是某个数据值更大的一方则值越大优先级越小,相反则值越小优先级越大。优先队列是输出优先级最高的数据的队列。...

2019-08-19 15:24:06 698

原创 PAT A1022 Digital Library (30 分)

A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number a...

2019-08-18 16:43:13 276

原创 PAT A1054 The Dominant Color (20 分)

Behind the scenes in the computer’s memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called the d...

2019-08-17 16:41:30 136

原创 PAT A1100 Mars Numbers (20 分)

People on Mars count their numbers with base 13:Zero on Earth is called “tret” on Mars.The numbers 1 to 12 on Earth is called “jan, feb, mar, apr, may, jun, jly, aug, sep, oct, nov, dec” on Mars, r...

2019-08-17 15:51:21 139

原创 PAT A1047 Student List for Course (25 分)

Zhejiang University has 40,000 students and provides 2,500 courses. Now given the registered course list of each student, you are supposed to output the student name lists of all the courses.Input Sp...

2019-08-16 21:23:35 138

原创 PAT A1039 Course List for Student (25 分)

Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who comes ...

2019-08-16 21:04:00 161

原创 几种常见的错误

格式错误多输出了空格或换行导致的,基本按照题目要求输出格式去做是不会错的。段错误段错误就是指访问的内存超出了系统所给这个程序的内存空间。在检查的时候重点排查循环语句中是否超出最大长度或者访问系统所保护的区域。浮点错误除数为零,模数为零。数据溢出导致的除数模数为零。...

2019-08-13 10:14:01 216

原创 数学基本知识整理

撰写原因由于在刷题过程中总是会遇到一些比较基础的数学知识,但是由于记忆模糊所以总是会想的很吃力,所以尝试写下这篇文章来记录自己容易忘记的一些知识,希望自己能够不断更新这篇文章,使之较为全面。公约数公约数,亦称“公因数”。它是一个能被若干个整数同时均整除的整数。如果一个整数同时是几个整数的约数,称这个整数为它们的“公约数”;公约数中最大的称为最大公约数。对任意的若干个正整数,1总是它们的公因数...

2019-08-10 00:10:08 948

原创 PAT A1081 Rational Sum

题目描述Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum.Input Specification:Each input file contains one test case. Each case starts with a positive ...

2019-08-09 23:25:41 154

原创 PAT B1013 数素数

题目描述令 P​i​​ 表示第 i 个素数。现任给两个正整数 M≤N≤10​4​​,请输出 P​M​​ 到 P​N​​ 的所有素数。输入格式:输入在一行中给出 M 和 N,其间以空格分隔。输出格式:输出从 P​M​​ 到 P​N​​ 的所有素数,每 10 个数字占 1 行,其间以空格分隔,但行末不得有多余空格。输入样例:5 27输出样例:11 13 17 19 23 29 31 ...

2019-08-09 15:58:02 184

原创 PAT B1008 数组元素循环右移问题

题目描述一个数组A中存有N(>0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(≥0)个位置,即将AAA中的数据由(A0A1⋯AN−1​​)变换为(AN−M⋯AN−1A0A1⋯AN−M−1​​)(最后M个数循环移至最前面的M个位置)。如果需要考虑程序移动数据的次数尽量少,要如何设计移动的方法?输入格式:每个输入包含一个测试用例,第1行输入N(1≤N≤100)和M(≥0)...

2019-08-09 10:51:01 136

原创 PAT B1003 我要通过!

题目描述“答案正确”是自动判题系统给出的最令人欢喜的回复。本题属于 PAT 的“答案正确”大派送 —— 只要读入的字符串满足下列条件,系统就输出“答案正确”,否则输出“答案错误”。得到“答案正确”的条件是:字符串中必须仅有 P、 A、 T这三种字符,不可以包含其它字符;任意形如 xPATx 的字符串都可以获得“答案正确”,其中 x 或者是空字符串,或者是仅由字母 A 组成的字符串;如果 ...

2019-08-08 22:33:02 134

原创 PAT B1019 / A1069 The Black Hole of Numbers

题目描述For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing order, a new number can be obtained by ...

2019-08-07 22:13:19 274

原创 PAT B1045 / A1101 快速排序

题目描述There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then the elements less than the pivot are moved to i...

2019-08-07 16:35:21 168

空空如也

空空如也

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

TA关注的人

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