*博客头图：

RGB颜色，例如：#AFAFAF

Hover：

RGB颜色，例如：#AFAFAF

RGB颜色，例如：#AFAFAF

# weixin_43349929的博客

• 博客(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 576

#### 原创 『杭电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 295

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

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

2020-07-31 11:07:07 35

#### 原创 『杭电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 50

#### 原创 『杭电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 34

#### 原创 面试题 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 81

#### 原创 『杭电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 69

#### 原创 『杭电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 56

#### 原创 『杭电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 50

#### 原创 『杭电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 71

#### 原创 『杭电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 67

#### 原创 题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 50

#### 原创 『杭电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 45

#### 原创 『杭电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 70

#### 原创 『杭电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 47

#### 原创 『杭电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 60

#### 原创 『杭电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 98

#### 原创 题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 82

#### 原创 『杭电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 133

#### 原创 『杭电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 194

#### 原创 『杭电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 161

#### 原创 『杭电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 133

#### 原创 『杭电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 32

#### 原创 题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 34

#### 原创 『杭电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 37

#### 原创 『杭电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 52

#### 原创 『杭电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 60

#### 原创 『杭电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 35

#### 原创 『杭电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 100

#### 原创 题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 32

#### 原创 『杭电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 44

#### 原创 『杭电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 40 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 49

#### 原创 『杭电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 29

#### 原创 『杭电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 69

#### 原创 题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 51

#### 原创 『杭电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 54

#### 原创 『杭电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 156

#### 原创 『杭电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 315

#### 原创 『杭电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 99

2020-06-09

#### RFID_19.11.5.mix

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

2020-04-28

2020-06-09

2020-06-08

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

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

2020-06-08

2020-04-30

#### floor light_19.11.1.mix

2020-04-29

###### 空空如也

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

TA关注的人 TA的粉丝