自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

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

Problem Description 枫之羽认为自己很强,想当武林盟主,于是找现任武林盟主氢氧化铜挑战。氢氧化铜欣然接受了挑战,两人约好于下个月的月圆之夜在HDU校园内的三根柱子上进行决战。这场PK赛肯定能吸引武林中所有人前来观战,所以他们找了有商业运作潜力的经济人你,让你来组织这场百年一见...

2020-07-31 11:24:30 394 0

原创 『杭电1409』Is It a Number

Problem Description In some programming languages(like C/C++), we define numbers like this: number -> digits optional_fraction optional_exponent...

2020-07-31 11:21:43 115 0

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

Problem Description 挂盐水的时候,如果滴起来有规律,先是滴一滴,停一下;然后滴二滴,停一下;再滴三滴,停一下...,现在有一个问题:这瓶盐水一共有VUL毫升,每一滴是D毫升,每一滴的速度是一秒(假设最后一滴不到D毫升,则花费的时间也算一秒),停一下的时间也是一秒这瓶水什么时...

2020-07-31 11:07:07 27 0

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

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

2020-07-31 11:01:56 49 0

原创 『杭电1406』完数

Problem Description 完数的定义:如果一个大于1的正整数的所有因子之和等于它的本身,则称这个数是完数,比如6,28都是完数:6=1+2+3;28=1+2+4+7+14。 本题的任务是判断两个正整数之间完数的个数。 Input 输入数据包含多行,第一行是一个正整数n,表...

2020-07-31 10:51:34 27 0

原创 面试题 08.03. 魔术索引

Java /*常规遍历 *作者@v7fgg *执行用时 :1 ms, 在所有 Java 提交中击败了57.67%的用户 *内存消耗 :40.5 MB, 在所有 Java 提交中击败了100.00%的用户 *2020年5月11日 7:39 */ class Solution { ...

2020-07-31 10:44:39 62 0

原创 『杭电1405』The Last Practice

Problem Description Tomorrow is contest day, Are you all ready? We have been training for 45 days, and all guys must be tired.But , you are so luck...

2020-07-30 10:25:39 49 0

原创 『杭电1404』Digital Deletions

Problem Description Digital deletions is a two-player game. The rule of the game is as following. Begin by writing down a string of digits (numbers...

2020-07-30 10:22:29 44 0

原创 『杭电1403』Longest Common Substring

Problem Description Given two strings, you have to tell the length of the Longest Common Substring of them. For example: str1 = banana str2 = ciana...

2020-07-30 10:19:44 37 0

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

Problem Description Calculate A * B. Input Each line will contain two integers A and B. Process to end of file. Note: the length of each intege...

2020-07-30 10:17:40 69 0

原创 『杭电1401』Solitaire

Problem Description Solitaire is a game played on a chessboard 8x8. The rows and columns of the chessboard are numbered from 1 to 8, from the top t...

2020-07-30 10:04:34 47 0

原创 题343. 整数拆分

Python3 class Solution: def integerBreak(self, n): """ :type n: int :rtype: int ""&quo...

2020-07-30 08:57:38 43 0

原创 『杭电1400』Mondriaan‘s Dream

Problem Description Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his '...

2020-07-29 11:24:36 45 0

原创 『杭电1399』Starship Hakodate-maru

Problem Description The surveyor starship Hakodate-maru is famous for her two fuel containers with unbounded capacities. They hold the same type of...

2020-07-29 11:22:04 53 0

原创 『杭电1398』Square Coins

Problem Description People in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with va...

2020-07-29 11:18:42 38 0

原创 『杭电1397』Goldbach‘s Conjecture

Problem Description Goldbach's Conjecture: For any even number n greater than or equal to 4, there exists at least one pair of prime numbers p...

2020-07-29 11:16:33 53 0

原创 『杭电1396』Counting Triangles

Problem Description Given an equilateral triangle with n the length of its side, program to count how many triangles in it. Input The length...

2020-07-29 11:14:04 78 0

原创 题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]...

2020-07-29 11:09:17 74 0

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

Problem Description Give a number n, find the minimum x(x>0) that satisfies 2^x mod n = 1. Input One positive integer on each line, the valu...

2020-07-28 10:36:30 72 0

原创 『杭电1394』Minimum Inversion Number

Problem Description The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai &g...

2020-07-28 10:31:24 80 0

原创 『杭电1393』Weird Clock

Problem Description A 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...

2020-07-28 10:24:17 82 0

原创 『杭电1392』Surround the Trees

Problem Description There 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 mi...

2020-07-28 09:31:33 41 0

原创 『杭电1391』Number Steps

Problem Description Starting from point (0,0) on a plane, we have written all non-negative integers 0, 1, 2,... as shown in the figure. For example...

2020-07-28 09:16:20 24 0

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

Python3 class Solution: def maxDepth(self, root): """ :type root: TreeNode :rtype: int "&qu...

2020-07-28 09:11:34 20 0

原创 『杭电1390』Binary Numbers

Problem Description Given a positive integer n, find the positions of all 1's in its binary representation. The position of the least signific...

2020-07-27 10:07:57 20 0

原创 『杭电1389』Markov Trains

Problem Description Business is not going well for the Dutch Railway Company NS. Due to technical problems, they are forced to cancel many train se...

2020-07-27 10:02:06 41 0

原创 『杭电1388』Input

Problem Description In a recent programming contest, one of the problems was about tiling floors with rectangular tiles. The input specification re...

2020-07-27 09:36:15 52 0

原创 『杭电1387』Team Queue

Problem Description Queues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not so ...

2020-07-27 09:30:02 29 0

原创 『杭电1386』Elevator Simulation

Problem Description You are to simulate the movements of an elevator, which works according to the following rules: The elevator stays 3 seconds fo...

2020-07-27 09:12:00 59 0

原创 题392. 判断子序列

C++ class Solution { public: bool isSubsequence(string s, string t) { //暴力的解法 //为空串时 也是子串 int cnt=0; bool flag;...

2020-07-27 08:59:54 26 0

原创 『杭电1385』Minimum Transport Cost

Problem Description These are N cities in Spring country. Between each pair of cities there may be one transportation track or none. Now there is s...

2020-07-26 09:18:21 34 0

原创 『杭电1384』Intervals

Problem Description You are given n closed, integer intervals [ai, bi] and n integers c1, ..., cn. Write a program that: > reads the number of i...

2020-07-26 09:11:50 32 0

原创 『杭电1383』Company

Problem Description company pays different hourly wages for different job types. Each week the company keeps evidence of the total number of work h...

2020-07-26 09:08:22 24 0

原创 『杭电1382』Ball Toss

Problem Description Classmates stand in a circle facing inward, each with the direction left or right in mind. One of the students has a ball and b...

2020-07-26 09:04:38 26 0

原创 『杭电1381』Crazy Search

Problem Description Many people like to solve hard puzzles some of which may lead them to madness. One such puzzle could be finding a hidden prime ...

2020-07-26 09:01:02 45 0

原创 题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<ve...

2020-07-26 00:35:57 38 0

原创 『杭电1380』Nonstop Travel

Problem Description Fast Phil works the late shift and leaves his company's parking lot at precisely 2:00 AM every morning. His route home is ...

2020-07-25 11:15:27 36 0

原创 『杭电1379』DNA Sorting

Problem Description One measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to...

2020-07-25 10:57:57 56 0

原创 『杭电1378』Formatting Text

Problem Description Writings e-mails is fun, but, unfortunately, they do not look very nice, mainly because not all lines have the same lengths. In...

2020-07-25 10:53:24 131 0

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

Problem Description XML, eXtensible Markup Language, is poised to become the lingua franca of structured data communication for the foreseeable fut...

2020-07-25 10:47:59 72 0

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