自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(145)
  • 资源 (7)
  • 收藏
  • 关注

原创 『杭电1720』A+B Coming

Problem DescriptionMany classmates said to me that A+B is must needs.If you can’t AC this problem, you would invite me for night meal. ^_^InputInput may contain multiple test cases. Each case contains A and B in one line.A, B are hexadecimal num

2020-09-30 06:08:24 157

原创 『杭电1719』Friend

Problem DescriptionFriend number are defined recursively as follows.(1) numbers 1 and 2 are friend number;(2) if a and b are friend numbers, so is ab+a+b;(3) only the numbers defined in (1) and (2) are friend number.Now your task is to judge whether

2020-09-30 06:06:51 125

原创 『杭电1718』Rank

Problem DescriptionJackson wants to know his rank in the class. The professor has posted a list of student numbers and marks. Compute Jackson’s rank in class; that is, if he has the top mark(or is tied for the top mark) his rank is 1; if he has the seco

2020-09-30 06:04:54 109

原创 『杭电1717』小数化分数2

Problem DescriptionRay 在数学课上听老师说,任何小数都能表示成分数的形式,他开始了化了起来,很快他就完成了,但他又想到一个问题,如何把一个循环小数化成分数呢?请你写一个程序不但可以将普通小数化成最简分数,也可以把循环小数化成最简分数。Input第一行是一个整数N,表示有多少组数据。每组数据只有一个纯小数,也就是整数部分为0。小数的位数不超过9位,循环部分用()括起来。Output对每一个对应的小数化成最简分数后输出,占一行。Sample Inpu

2020-09-30 06:02:21 133

原创 『杭电1716』排列2

Problem DescriptionRay又对数字的列产生了兴趣:现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数。Input每组数据占一行,代表四张卡片上的数字(0<=数字<=9),如果四张卡片都是0,则输入结束。Output对每组卡片按从小到大的顺序输出所有能由这四张卡片组成的4位数,千位数字相同的在同一行,同一行中每个四位数间用空格分隔。每组输出数据间空一行,最后一组数据后面没有空行。Sample Input

2020-09-30 05:59:59 249

原创 题701. 二叉搜索树中的插入操作

Javapublic class Solution { public TreeNode insertIntoBST(TreeNode root, int val) { if(root == null) { return new TreeNode(val); } if(root.val < val) { root.right = insertIntoBST(root.right, val);...

2020-09-30 05:55:07 122

原创 『杭电1715』大菲波数

Problem DescriptionFibonacci数列,定义如下:f(1)=f(2)=1f(n)=f(n-1)+f(n-2) n>=3。计算第n项Fibonacci数值。Input输入第一行为一个整数N,接下来N行为整数Pi(1<=Pi<=1000)。Output输出为N行,每行为对应的f(Pi)。Sample Input512345Sample Output11235Source

2020-09-29 06:59:23 138

原创 『杭电1714』RedField

Problem DescriptionAs the graph you see below, we named the red part "RedField".The read part is the intersection of an ellipse and a triangle.Now, 8600's not good at math, so he wants you to help him calculate the area of the "RedField".InputTh

2020-09-29 06:57:20 121

原创 『杭电1713』相遇周期

Problem Description2007年3月26日,在中俄两国元首的见证下,中国国家航天局局长孙来燕与俄罗斯联邦航天局局长别尔米诺夫共同签署了《中国国家航天局和俄罗斯联邦航天局关于联合探测火星-火卫一合作的协议》,确定中俄双方将于2009年联合对火星及其卫星“火卫一”进行探测。而卫星是进行这些探测的重要工具,我们的问题是已知两颗卫星的运行周期,求它们的相遇周期。Input输入数据的第一行为一个正整数T, 表示测试数据的组数. 然后是T组测试数据. 每组测试数据包含两组正整数,用空

2020-09-29 06:55:00 163

原创 『杭电1712』ACboy needs your help

Problem DescriptionACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit he will gain from different course depending on the days he spend on it.How to arrange the M days for the N courses to maximize the prof

2020-09-29 06:52:12 173

原创 『杭电1711』Number Sequence

Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = b[1], a[K + 1] = b[2], ...... , a[K + M - 1]

2020-09-29 06:49:32 128

原创 题145. 二叉树的后序遍历

Javaclass Solution { public List<Integer> postorderTraversal(TreeNode root) { List<Integer> list = new ArrayList<>(); postOrder(root,list); return list; } public void postOrder(TreeNode ...

2020-09-29 06:45:42 102

原创 『杭电1710』Binary Tree Traversals

Problem DescriptionA binary tree is a finite set of vertices that is either empty or consists of a root r and two disjoint binary trees called the left and right subtrees. There are three most important ways in which the vertices of a binary tree can be

2020-09-28 07:23:44 164

原创 『杭电1709』The Balance

Problem DescriptionNow you are asked to measure a dose of medicine with a balance and a number of weights. Certainly it is not always achievable. So you should find out the qualities which cannot be measured from the range [1,S]. S is the total quality

2020-09-28 07:21:36 160

原创 『杭电1708』Fibonacci String

Problem DescriptionAfter little Jim learned Fibonacci Number in the class , he was very interest in it.Now he is thinking about a new thing -- Fibonacci String .He defines : str[n] = str[n-1] + str[n-2] ( n > 1 )He is so crazying that if someone g

2020-09-28 07:19:26 166

原创 『杭电1707』Spring-outing Decision

Problem DescriptionNow is spring ! The sunshine is warm , the flowers is coming out . How lovely it is! So my classmates and I want to go out for a spring-outing.But we all select courses ourselves. We don't have classes at the same time.Now our monito

2020-09-28 07:16:21 151

原创 题117. 填充每个节点的下一个右侧节点指针 II

C++q.push(root);while(!q.empty()) { int n = q.size(); for (int i = 1; i <= n; ++i) { auto f = q.front(); q.pop(); // 拓展新节点 if (f->left) { q.push(f->left); } if (f->ri...

2020-09-28 07:12:22 103

原创 『杭电1705』Count the grid

Problem DescriptionA lattice point is an ordered pair (x, y) where x and y are both integers. Given the coordinates of the vertices of a triangle (which happen to be lattice points), you are to count the number of lattice points which lie completely ins

2020-09-27 07:00:38 190

原创 『杭电1704』Rank

Problem Descriptionthere are N ACMers in HDU team.ZJPCPC Sunny Cup 2007 is coming, and lcy want to select some excellent ACMers to attend the contest. There have been M matches since the last few days(No two ACMers will meet each other at two matches,

2020-09-27 06:58:19 125

原创 『杭电1703』PBD

Problem DescriptionPrisonBreak is a popular TV programme in HDU. ACboy likes it very much, and he join a PrisonBreak discussing team called "PBD".Every Tuesday night, a lot of PBDers will contact with each other to discuss the newest plot of PrisonBreak

2020-09-27 06:55:36 178

原创 题235. 二叉搜索树的最近公共祖先

JavaScript/** * Definition for a binary tree node. * function TreeNode(val) { * this.val = val; * this.left = this.right = null; * } *//** * @param {TreeNode} root * @param {TreeNode} p * @param {TreeNode} q * @return {TreeNode}...

2020-09-27 06:50:42 114

原创 『杭电1700』Points on Cycle

Problem DescriptionThere is a cycle with its center on the origin.Now give you a point on the cycle, you are to find out the other two points on it, to maximize the sum of the distance between each otheryou may assume that the radius of the cycle will

2020-09-26 07:07:28 144

原创 『杭电1698』Just a Hook

Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same length.Now Pudge wants to do some operations on.

2020-09-26 07:04:28 212

原创 题113. 路径总和 II

C++/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Solution {public: vector<vector<int..

2020-09-26 06:59:30 102

原创 『杭电1695』GCD

Problem DescriptionGiven 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x and y. Since the number of choices may be very large, you're only required to output the total

2020-09-25 07:24:07 376

原创 『杭电1693』Eat the Trees

Problem DescriptionMost of us know that in the game called DotA(Defense of the Ancient), Pudge is a strong hero in the first period of the game. When the game goes to end however, Pudge is not a strong hero any more.So Pudge’s teammates give him a new

2020-09-25 07:20:53 219

原创 『杭电1692』Destroy the Well of Life

Problem DescriptionIn the game of DotA (Defense of the Ancient), there are two opposite legions called The Sentinel and The Scourage.Now The Scourage has made a big success and The Sentinel is at stake!So The Sentinel must destroy the Well of Life o

2020-09-25 07:18:25 208

原创 『杭电1691』Chinese Chess

Problem DescriptionChinese chess, or Xiangqi is an extremely popular game in the Eastern Hemisphere. It is currently played by millions (or tens of millions) in China's mainland, Taiwan, Thailand, Singapore, Vietnam, Hong Kong and other Asian countries.

2020-09-25 07:15:58 242

原创 题106. 从中序与后序遍历序列构造二叉树

Javaclass Solution { public TreeNode buildTree(int[] inorder, int[] postorder) { if(postorder.length>0) { TreeNode root =new TreeNode(postorder[postorder.length-1]); List<Integer> order=new ArrayList&lt...

2020-09-25 07:10:46 112

原创 『杭电1690』Bus System

Problem DescriptionBecause of the huge population of China, public transportation is very important. Bus is an important transportation method in traditional public transportation system. And it’s still playing an important role even now.The bus system

2020-09-24 07:19:34 111

原创 『杭电1689』Alien’s Necklace

Problem DescriptionJYY is taking a trip to Mars. To get accepted by the Martians, he decided to make a magic necklace for their king. (Otherwise, JYY will be eaten) Now, he has collected many magic balls, and he is going to string them up.Unfortunately

2020-09-24 07:16:06 152

原创 『杭电1688』Sightseeing

Problem DescriptionTour operator Your Personal Holiday organises guided bus trips across the Benelux. Every day the bus moves from one city S to another city F. On this way, the tourists in the bus can see the sights alongside the route travelled. Moreo

2020-09-24 07:12:58 138

原创 『杭电1687』Lucky Light

Problem DescriptionWe have a (point) light source at position (xL, yL) with yL > 0, and a finite series of line segments, all of finite non-zero length, given by the coordinates of their two endpoints. These endpoints are all different. The line segm

2020-09-24 07:10:19 117

原创 『杭电1686』Oulipo

Problem DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book:Tout avait Pair normal, mais tout s’affirmait faux. Tout avait Fair nor

2020-09-24 07:07:54 116 1

原创 题501. 二叉搜索树中的众数

C++/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Solution {public: vector<int...

2020-09-24 07:05:15 117

原创 『杭电1685』Booksort

Problem DescriptionThe Leiden University Library has millions of books. When a student wants to borrow a certain book, he usually submits an online loan form. If the book is available, then the next day the student can go and get it at the loan counter.

2020-09-23 07:31:50 171

原创 『杭电1684』Projects

Problem DescriptionIn a certain week, a company wants to finish m projects. To this end, the company can employ at most n people from the unemployment agency for a period of one week. Each external employee will cost the company salary euro, unless the

2020-09-23 07:29:20 69

原创 『杭电1683』Colour sequence

Problem DescriptionWe have a pile of cards consisting of 100 cards that are coloured on both sides. There is a finite number of colours (at most 26). In addition there are special cards called jokers. Jokers have a joker sign on both sides, which can as

2020-09-23 07:26:23 194

原创 『杭电1681』Frobenius

Problem DescriptionThe Frobenius problem is an old problem in mathematics, named after the German mathematician G. Frobenius (1849–1917).Let a1, a2, …, an be integers larger than 1, with greatest common divisor (gcd) 1. Then it is known that there are

2020-09-23 07:24:00 255

原创 题617. 合并二叉树

C++class Solution {public: TreeNode* mergeTrees(TreeNode* t1, TreeNode* t2) { if (t1==NULL) {//两树的值比较,以一个为基准 return t2; } if (t2==NULL) { return t1; } t1->val+=t2->val;//合并...

2020-09-23 07:21:40 123

51单片机竞赛设计实例程序44例(Proteus仿真资料).zip

1、12位AD_DS1621与12864液晶、2、16X192点阵程序、3、多变循环彩灯、4、51单片机12864大液晶屏proteus仿真、5、AD0832设计的电压表32X16点阵显示、6、ad0831_lcd_da0808_ds1302_24c64的应用、7、10BitDA正弦信号发生器、8、DS1302时钟+1602液晶、9、LCD滚动显示汉字、10、Max7221动态显示、11、播放音乐、12、单片机设计2008奥运会、13、非常形象的交通灯控制设计、14、温度计设计、15、字符液晶1602仿真测试、16、485全双工通信应用、17、AT89C51对直流电动机的驱动、18、步进电机控制_液晶显示、19、步进电机控制程序液晶显示、20、超级终端、21、红外遥控模拟、22、直流电机测速+中文液晶显示、23、数控云台master、24、单片机水塔控制系统、25、数控直流稳压电源、26、智能温控器、27、自行车测速仿真、28、lcd-12864应用、29、密码锁、30、万年历、31、编码开关试验、32、超大屏幕点阵显示、33、创意LOVE彩灯欣赏、34、8通道自动温度检测系统仿真(含原程序)、35、485全双工通信、36、可预设电压的数控电源(功能强大)、37、ds18b20、38、DS18B20(已通过)、39、多机通信、40、工厂屏、41、模拟串口、42、双单片机串口例子、43、单片机水塔控制系统、44、舞蹈机器人步进机仿真

2020-06-09

《单片机C语言程序设计实训100例——基于8051+Proteus仿真》案例压缩包.zip

单片机C语言程序设计实训100例:基于8051+Proteus仿真讲述了:第一章用简短篇幅介绍8051单片机的特点、应用,以及Keil C语言程序设计,在语言程序设计中重点介绍8051内部资源;第二章介绍Proteus的入门操作;第三~五章全部为单片机的C程序设计案例;第三章为基础案例,涉及C语言基础部分,基本IO部分,中断与定时器,串口控制,模数与数模转换部分等;第四章在前面的基础上对扩展的外围硬件应用进行编程,包括译码器、串并转换芯片、存储器、中英文液晶屏、IIC等;第五章是综合设计部分,涉及一些具体的应用型产品的设计。

2020-06-09

51单片机的出租车计价器C语言程序.zip

了解和掌握掉电存储芯片AT24C02、霍尔传感器A44E、数码管、驱动芯片74LS245等外部接口芯片器件的应用。

2020-06-08

单片机原理与应用实验.zip

《单片机原理及应用实验指导》主要内容:单片机原理及应用实验是单片机原理及应用课程的一部分,其任务是:   (1)通过实验进一步了解和掌握单片机原理的基本概念、单片机应用系统的硬件设计及调试方法。   (2)学习和掌握单片机应用系统的程序设计技术。   (3)提升应用计算机的能力及水平,培养逻辑思维及动手能力。

2020-06-08

计算机网络实验1.docx

计算机网络实验报告一 ——常见网络命令的应用 掌握常用网络命令的使用方法,理解网络命令的功能,熟练运用命令分析网络状态。更具体的是,学会使用ping, netstat, ipconfig, route, tracert等常用网络命令检测网络是否连通、了解网络的配置状态、跟踪路由等相关网络问题。

2020-04-30

floor light_19.11.1.mix

用Mixly实现智能楼道控制灯,通过声音传感器,以及人体红外传感器接收到的信号值来执行判断灯的亮灭。若考虑白天不亮灯的情况,则应加装一个光线传感器来判断。

2020-04-29

RFID_19.11.5.mix

MIxly——RFID智能门禁系统 1.读取校园卡ID号。 2.读取到指定校园卡使用S90舵机开门,并延时1秒后自动关闭。

2020-04-28

空空如也

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

TA关注的人

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