自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 『杭电1410』PK武林盟主

Problem Description枫之羽认为自己很强,想当武林盟主,于是找现任武林盟主氢氧化铜挑战。氢氧化铜欣然接受了挑战,两人约好于下个月的月圆之夜在HDU校园内的三根柱子上进行决战。这场PK赛肯定能吸引武林中所有人前来观战,所以他们找了有商业运作潜力的经济人你,让你来组织这场百年一见的世纪之战,假设两人都有一定的血HP1、HP2.HP1是枫之羽的,HP2是氢氧化铜的。他们也有一定攻击力AP1、AP2,AP1是枫之羽的,AP2是氢氧化铜的。当进行攻击时,对方的HP减少自己的攻击力,比如HP1=2

2020-07-31 11:24:30 784

原创 『杭电1409』Is It a Number

Problem DescriptionIn some programming languages(like C/C++), we define numbers like this:number -> digits optional_fraction optional_exponentoptional_fraction -> [empty] | .digitsoptional_exponent -> [empty] | E digits | E - digitsdigits -

2020-07-31 11:21:43 481

原创 『杭电1408』盐水的故事

Problem Description挂盐水的时候,如果滴起来有规律,先是滴一滴,停一下;然后滴二滴,停一下;再滴三滴,停一下...,现在有一个问题:这瓶盐水一共有VUL毫升,每一滴是D毫升,每一滴的速度是一秒(假设最后一滴不到D毫升,则花费的时间也算一秒),停一下的时间也是一秒这瓶水什么时候能挂完呢?Input输入数据包含多个测试实例,每个实例占一行,由VUL和D组成,其中 0<D<VUL<5000。Output对于每组测试数据,请输出挂完盐水需要的时间,每

2020-07-31 11:07:07 169

原创 『杭电1407』测试你是否和LTC水平一样高

Problem Description大家提到LTC都佩服的不行,不过,如果竞赛只有这一个题目,我敢保证你和他绝对在一个水平线上!你的任务是:计算方程x^2+y^2+z^2= num的一个正整数解。Input输入数据包含多个测试实例,每个实例占一行,仅仅包含一个小于等于10000的正整数num。Output对于每组测试数据,请按照x,y,z递增的顺序输出它的一个最小正整数解,每个实例的输出占一行,题目保证所有测试数据都有解。Sample Input3Sam

2020-07-31 11:01:56 138

原创 『杭电1406』完数

Problem Description完数的定义:如果一个大于1的正整数的所有因子之和等于它的本身,则称这个数是完数,比如6,28都是完数:6=1+2+3;28=1+2+4+7+14。本题的任务是判断两个正整数之间完数的个数。Input输入数据包含多行,第一行是一个正整数n,表示测试实例的个数,然后就是n个测试实例,每个实例占一行,由两个正整数num1和num2组成,(1<num1,num2<10000) 。Output对于每组测试数据,请输出num1和num2之

2020-07-31 10:51:34 194

原创 面试题 08.03. 魔术索引

Java/*常规遍历 *作者@v7fgg *执行用时 :1 ms, 在所有 Java 提交中击败了57.67%的用户 *内存消耗 :40.5 MB, 在所有 Java 提交中击败了100.00%的用户 *2020年5月11日 7:39 */class Solution { public int findMagicIndex(int[] nums) { for(int i=0;i<nums.length;i++){ if(nu...

2020-07-31 10:44:39 132

原创 『杭电1405』The Last Practice

Problem DescriptionTomorrow is contest day, Are you all ready?We have been training for 45 days, and all guys must be tired.But , you are so lucky comparing with many excellent boys who have no chance to attend the Province-Final.Now, your task is rel

2020-07-30 10:25:39 201

原创 『杭电1404』Digital Deletions

Problem DescriptionDigital deletions is a two-player game. The rule of the game is as following.Begin by writing down a string of digits (numbers) that's as long or as short as you like. The digits can be 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and appear in any

2020-07-30 10:22:29 200

原创 『杭电1403』Longest Common Substring

Problem DescriptionGiven two strings, you have to tell the length of the Longest Common Substring of them.For example:str1 = bananastr2 = cianaicSo the Longest Common Substring is "ana", and the length is 3.InputThe input contains several test

2020-07-30 10:19:44 160

原创 『杭电1402』A * B Problem Plus

Problem DescriptionCalculate A * B.InputEach line will contain two integers A and B. Process to end of file.Note: the length of each integer will not exceed 50000.OutputFor each case, output A * B in one line.Sample Input1210002

2020-07-30 10:17:40 188

原创 『杭电1401』Solitaire

Problem DescriptionSolitaire is a game played on a chessboard 8x8. The rows and columns of the chessboard are numbered from 1 to 8, from the top to the bottom and from left to right respectively.There are four identical pieces on the board. In one move

2020-07-30 10:04:34 216

原创 题343. 整数拆分

Python3class Solution: def integerBreak(self, n): """ :type n: int :rtype: int """ if n == 1: return 1 mem = [-1 for i in range(n + 1)] mem[1] = 1 for i in range(2, n +...

2020-07-30 08:57:38 199

原创 『杭电1400』Mondriaan‘s Dream

Problem DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, for all of his paper was filled with squares a

2020-07-29 11:24:36 168

原创 『杭电1399』Starship Hakodate-maru

Problem DescriptionThe surveyor starship Hakodate-maru is famous for her two fuel containers with unbounded capacities. They hold the same type of atomic fuel balls.There, however, is an inconvenience. The shapes of the fuel containers #1 and #2 are al

2020-07-29 11:22:04 186

原创 『杭电1398』Square Coins

Problem DescriptionPeople in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all square numbers up to 289 (=17^2), i.e., 1-credit coins, 4-credit coins, 9-credit coins, ..., an

2020-07-29 11:18:42 150

原创 『杭电1397』Goldbach‘s Conjecture

Problem DescriptionGoldbach's Conjecture: For any even number n greater than or equal to 4, there exists at least one pair of prime numbers p1 and p2 such that n = p1 + p2.This conjecture has not been proved nor refused yet. No one is sure whether this

2020-07-29 11:16:33 180

原创 『杭电1396』Counting Triangles

Problem DescriptionGiven an equilateral triangle with n the length of its side, program to count how many triangles in it.InputThe length n (n <= 500) of the equilateral triangle's side, one per line.process to the end of the fileOutput.

2020-07-29 11:14:04 285

原创 题LCP 13. 寻宝

C++class Solution {public: int dir[4][2]={{1,0},{-1,0},{0,1},{0,-1}}; struct Point{ int x; int y; }; int dis[105][105]; int m,n; Point S,T; int mcnt; int ocnt; vector<vector<int&gt...

2020-07-29 11:09:17 185

原创 『杭电1395』2^x mod n = 1

Problem DescriptionGive a number n, find the minimum x(x>0) that satisfies 2^x mod n = 1.InputOne positive integer on each line, the value of n.OutputIf the minimum x exists, print a line with 2^x mod n = 1.Print 2^? mod n = 1 otherwise.

2020-07-28 10:36:30 240

原创 『杭电1394』Minimum Inversion Number

Problem DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai > aj.For a given sequence of numbers a1, a2, ..., an, if we move the first m >= 0 numbers to the end o

2020-07-28 10:31:24 311

原创 『杭电1393』Weird Clock

Problem DescriptionA weird clock marked from 0 to 59 has only a minute hand. It won't move until a special coin is thrown into its box. There are different kinds of coins as your options. However once you make your choice, you cannot use any other kind.

2020-07-28 10:24:17 292

原创 『杭电1392』Surround the Trees

Problem DescriptionThere are a lot of trees in an area. A peasant wants to buy a rope to surround all these trees. So at first he must know the minimal required length of the rope. However, he does not know how to calculate it. Can you help him?The dia

2020-07-28 09:31:33 282

原创 『杭电1391』Number Steps

Problem DescriptionStarting from point (0,0) on a plane, we have written all non-negative integers 0, 1, 2,... as shown in the figure. For example, 1, 2, and 3 has been written at points (1,1), (2,0), and (3, 1) respectively and this pattern has continu

2020-07-28 09:16:20 135

原创 题104. 二叉树的最大深度

Python3class Solution: def maxDepth(self, root): """ :type root: TreeNode :rtype: int """ if root is None: return 0 else: left_height = self.maxDepth(root.left) ...

2020-07-28 09:11:34 152 1

原创 『杭电1390』Binary Numbers

Problem DescriptionGiven a positive integer n, find the positions of all 1's in its binary representation. The position of the least significant bit is 0.ExampleThe positions of 1's in the binary representation of 13 are 0, 2, 3.TaskWrite a program

2020-07-27 10:07:57 178

原创 『杭电1389』Markov Trains

Problem DescriptionBusiness is not going well for the Dutch Railway Company NS. Due to technical problems, they are forced to cancel many train services without advance notice. This is, of course, extremely frustrating for students who travel from home

2020-07-27 10:02:06 181

原创 『杭电1388』Input

Problem DescriptionIn a recent programming contest, one of the problems was about tiling floors with rectangular tiles. The input specification reads like this:The input contains several floors. The first line of the input gives the number of floors.E

2020-07-27 09:36:15 154

原创 『杭电1387』Team Queue

Problem DescriptionQueues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not so well known, though it occurs often in everyday life. At lunch time the queue in front of the Mensa is a tea

2020-07-27 09:30:02 167

原创 『杭电1386』Elevator Simulation

Problem DescriptionYou are to simulate the movements of an elevator, which works according to the following rules:The elevator stays 3 seconds for customers to get in or get out. If some customers want to get in and some want to get out, the elevator s

2020-07-27 09:12:00 571

原创 题392. 判断子序列

C++class Solution {public: bool isSubsequence(string s, string t) { //暴力的解法 //为空串时 也是子串 int cnt=0; bool flag; for(int i=0;i<s.size();i++){ flag=false;//标记不能找到 for(int j=cnt;j&lt...

2020-07-27 08:59:54 121

原创 『杭电1385』Minimum Transport Cost

Problem DescriptionThese are N cities in Spring country. Between each pair of cities there may be one transportation track or none. Now there is some cargo that should be delivered from one city to another. The transportation fee consists of two parts:

2020-07-26 09:18:21 150

原创 『杭电1384』Intervals

Problem DescriptionYou are given n closed, integer intervals [ai, bi] and n integers c1, ..., cn.Write a program that:> reads the number of intervals, their endpoints and integers c1, ..., cn from the standard input,> computes the minimal size

2020-07-26 09:11:50 189 1

原创 『杭电1383』Company

Problem Descriptioncompany pays different hourly wages for different job types. Each week the company keeps evidence of the total number of work hours for every job type and the total amount paid to all employees for that week. In different weeks differ

2020-07-26 09:08:22 158

原创 『杭电1382』Ball Toss

Problem DescriptionClassmates stand in a circle facing inward, each with the direction left or right in mind. One of the students has a ball and begins by tossing it to another student. (It doesn't really matter which one.) When one catches the ball and

2020-07-26 09:04:38 177

原创 『杭电1381』Crazy Search

Problem DescriptionMany people like to solve hard puzzles some of which may lead them to madness. One such puzzle could be finding a hidden prime number in a given text. Such number could be the number of different substrings of a given size that exist

2020-07-26 09:01:02 205

原创 题329. 矩阵中的最长递增路径

C++class Solution {public: vector<vector<int>>f; int dx[4]={-1,0,1,0},dy[4]={0,1,0,-1}; int dp(int x, int y, vector<vector<int>>& m){ if(f[x][y]!=-1)return f[x][y]; f[x][y]=1; for(int ...

2020-07-26 00:35:57 168

原创 『杭电1380』Nonstop Travel

Problem DescriptionFast Phil works the late shift and leaves his company's parking lot at precisely 2:00 AM every morning. His route home is by a straight road which has one or more traffic signals. Phil has always wondered if, given the locations and c

2020-07-25 11:15:27 185

原创 『杭电1379』DNA Sorting

Problem DescriptionOne 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, since D is greater than four letters

2020-07-25 10:57:57 255

原创 『杭电1378』Formatting Text

Problem DescriptionWritings e-mails is fun, but, unfortunately, they do not look very nice, mainly because not all lines have the same lengths. In this problem, your task is to write an e-mail formatting program which reformats a paragraph of an e-mail

2020-07-25 10:53:24 449

原创 『杭电1377』A Well-Formed Problem

Problem DescriptionXML, eXtensible Markup Language, is poised to become the lingua franca of structured data communication for the foreseeable future, due in part to its strict formatting requirements. XML parsers must report anything that violates the

2020-07-25 10:47:59 213

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关注的人

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