自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 『杭电1565』方格取数(1)

Problem Description给你一个n*n的格子的棋盘,每个格子里面有一个非负数。从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的和最大。Input包括多个测试实例,每个测试实例包括一个整数n 和n*n个非负数(n<=20)Output对于每个测试实例,输出可能取得的最大的和Sample Input375 15 2175 15 2834 70 5Sample Output

2020-08-31 06:57:17 36

原创 『杭电1564』Play a game

Problem DescriptionNew Year is Coming!ailyanlu is very happy today! and he is playing a chessboard game with 8600.The size of the chessboard is n*n. A stone is placed in a corner square. They play alternatively with 8600 having the first move. Each ti

2020-08-31 06:55:00 50

原创 『杭电1563』Find your present!

Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them will be yours.Each present has a card number on it, and your

2020-08-31 06:52:28 50

原创 『杭电1562』Guess the number

Problem DescriptionHappy new year to everybody!Now, I want you to guess a minimum number x betwwn 1000 and 9999 to let(1) x % a = 0;(2) (x+1) % b = 0;(3) (x+2) % c = 0;and a, b, c are integers between 1 and 100.Given a,b,c, tell me what is the num

2020-08-31 06:49:19 37

原创 『杭电1561』The more, The Better

Problem DescriptionACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多的宝物应该攻克哪M个城堡吗?Input每个测试实例首先包括2个整数,N,M.(1 <= M <= N <= 200);在接下来的N行里,每行包括2个整数,a,b. 在第 i 行,a

2020-08-31 06:47:09 24

原创 题841. 钥匙和房间

C++class Solution {public: void DFS(int r,vector<vector<int>>& rooms,vector<int>& vis){ for(int i=0;i<rooms[r].size();i++){ if(vis[rooms[r][i]]==0){ vis[rooms[r][i]]=1; ...

2020-08-31 06:44:05 99

原创 『杭电1560』DNA sequence

Problem DescriptionThe twenty-first century is a biology-technology developing century. We know that a gene is made of DNA. The nucleotide bases from which DNA is built are A(adenine), C(cytosine), G(guanine), and T(thymine). Finding the longest common

2020-08-30 06:57:39 39

原创 『杭电1559』最大子矩阵

Problem Description给你一个m×n的整数矩阵,在上面找一个x×y的子矩阵,使子矩阵中所有元素的和最大。Input输入数据的第一行为一个正整数T,表示有T组测试数据。每一组测试数据的第一行为四个正整数m,n,x,y(0<m,n<1000 AND 0<x<=m AND 0<y<=n),表示给定的矩形有m行n列。接下来这个矩阵,有m行,每行有n个不大于1000的正整数。Output对于每组数据,输出一个整数,表示子矩阵的最大和。

2020-08-30 06:55:21 27

原创 『杭电1558』Segment set

Problem DescriptionA segment and all segments which are connected with it compose a segment set. The size of a segment set is the number of segments in it. The problem is to find the size of some segment set.InputIn the first line there is an .

2020-08-30 06:53:00 40

原创 『杭电1557』权利指数

Problem Description在选举问题中,总共有n个小团体,每个小团体拥有一定数量的选票数。如果其中m个小团体的票数和超过总票数的一半,则此组合为“获胜联盟”。n个团体可形成若干个获胜联盟。一个小团体要成为一个“关键加入者”的条件是:在其所在的获胜联盟中,如果缺少了这个小团体的加入,则此联盟不能成为获胜联盟。一个小团体的权利指数是指:一个小团体在所有获胜联盟中成为“关键加入者”的次数。请你计算每个小团体的权利指数。Input输入数据的第一行为一个正整数T,表示有T组测试数据。每一

2020-08-30 06:50:28 34

原创 『杭电1556』Color the ball

Problem DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几次颜色吗?Input每个测试实例第一行为一个整数N,(N <= 100000).接下来的N行,每行包括2个整数a b(1 <= a <= b <= N)。

2020-08-30 06:48:08 28

原创 题557. 反转字符串中的单词 III

Python3class Solution(object): def reverseWords(self, s): """ :type s: str :rtype: str 输入: "Let's take LeetCode contest" 输出: "s'teL ekat edoCteeL tsetnoc" """ str_list = [] for word i..

2020-08-30 06:45:24 32

原创 『杭电1555』How many days?

Problem Description8600的手机每天消费1元,每消费K元就可以获赠1元,一开始8600有M元,问最多可以用多少天?Input输入包括多个测试实例.每个测试实例包括2个整数M, k,(2 <= k <= M <= 1000).M = 0, k = 0代表输入结束.Output对于每个测试实例输出一个整数,表示M元可以用的天数。Sample Input2 24 30 0Sample Output35Au

2020-08-29 20:43:29 27

原创 『杭电1554』Pairs of integers

Problem DescriptionYou are to find all pairs of integers such that their sum is equal to the given integer number N and the second number results from the first one by striking out one of its digits. The first integer always has at least two digits and

2020-08-29 20:41:27 48

原创 『杭电1553』Library

Problem DescriptionCastaway Robinson Crusoe is living alone on a remote island. One day a ship carrying a royal library has wrecked nearby. Usually Robinson brings any useful stuff from the shipwreck to his island, and this time he has brought a big che

2020-08-29 20:39:20 26

原创 『杭电1551』Cable master

Problem DescriptionInhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever. It was decided to connect computers for the contestant

2020-08-29 20:35:44 26

原创 题214. 最短回文串

Javaclass Solution { public String shortestPalindrome(String s) { int n=s.length(); String str=s+"#"+new StringBuilder(s).reverse().toString(); int[] prefix=new int[str.length()]; getTable(str,prefix); ...

2020-08-29 20:23:17 39

原创 题657. 机器人能否返回原点

C++class Solution {public: bool judgeCircle(string moves) { unordered_map<char, int> mp; for(char move : moves) { mp[move]++; } if (mp['L'] == mp['R'] && mp['U'] == mp['D']) return true; return false; }};Jav...

2020-08-28 19:22:11 56

原创 『杭电1548』A strange lift

Problem DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and down.When you at floor i,if you press the button "UP" , you w

2020-08-28 19:18:07 51

原创 『杭电1547』Bubble Shooter

Problem DescriptionBubble shooter is a popular game. You can find a lot of versions from the Internet.The goal of this game is to clean the bubbles off the field. Every time you just point the cannon to where you want the next bubble to go, and if thre

2020-08-28 19:16:26 47

原创 『杭电1546』Idiomatic Phrases Game

Problem DescriptionTom is playing a game called Idiomatic Phrases Game. An idiom consists of several Chinese characters and has a certain meaning. This game will give Tom two idioms. He should build a list of idioms and the list starts and ends with the

2020-08-28 19:12:27 26

原创 『杭电1545』01-K Code

Problem DescriptionConsider a code string S of N symbols, each symbol can only be 0 or 1. In any consecutive substring of S, the number of 0's differs from the number of 1's by at most K. How many such valid code strings S are there?For example, when N

2020-08-27 09:58:23 128 1

原创 『杭电1544』Palindromes

Problem DescriptionA regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from left to right as when the string is r

2020-08-27 09:54:22 42

原创 『杭电1543』Paint the Wall

Problem DescriptionHere comes our future artist. See, he is painting again, this time on home's white wall, using different color of paint. Let me see, red, yellow, black, green... but why does he just paint rectangles? Pretty guy, seems he is fond of i

2020-08-27 09:51:30 95

原创 『杭电1542』Atlantis

Problem DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the island. But unfortunately, these maps describe different regions of Atlantis. Your fr

2020-08-27 09:46:50 44 1

原创 『杭电1541』Stars

Problem DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and not to the right of the given star

2020-08-27 09:42:40 24

原创 题332. 重新安排行程

C++class Solution {public: vector<string>re; void dfs(vector<string> &temp, map<string, map<string, int> > &m, map<string, map<string, int> > &v, int n){ if(temp.size()==n){...

2020-08-27 09:33:53 74

原创 『杭电1540』Tunnel Warfare

Problem DescriptionDuring the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay in a line. Except the two at the ends, every village

2020-08-26 21:54:13 40

原创 『杭电1539』Shredding Company

Problem DescriptionYou have just been put in charge of developing a new shredder for the Shredding Company. Although a "normal" shredder would just shred sheets of paper into little pieces so that the contents would become unreadable, this new shredder

2020-08-26 21:49:01 35

原创 『杭电1538』A Puzzle for Pirates

Problem DescriptionA bunch of pirates have gotten their hands on a hoard of gold pieces and wish to divide the loot. They are democratic pirates in their own way, and it is their custom to make such divisions in the following manner: The fiercest pirate

2020-08-26 21:45:46 32

原创 『杭电1537』Rubik‘s Cube

Problem DescriptionRummaging through the stuff of your childhood you find an old toy which you identify as the famous Rubik's Cube. While playing around with it you have to acknowledge that throughout the years your ability to solve the puzzle has not i

2020-08-26 21:39:55 78

原创 『杭电1536』S-Nim

Problem DescriptionArthur and his sister Caroll have been playing a game called Nim for some time now. Nim is played as follows:The starting position has a number of heaps, all containing some, not necessarily equal, number of beads.The players ta...

2020-08-26 20:46:10 44

原创 题17. 电话号码的字母组合

C++class Solution {public: vector<string> letterCombinations(string digits) { vector<string> ret; if(digits.size()==0) return ret; vector<string> dict = {"abc", "def", "ghi",...

2020-08-26 20:40:58 52

原创 题491. 递增子序列

Javaclass Solution { public List<List<Integer>> findSubsequences(int[] nums) { List<List<Integer>> result = new ArrayList<>(); if (nums.length < 2) return result; List<Int...

2020-08-25 09:26:45 42

原创 『杭电1535』Invitation Cards

Problem DescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Comedies. They have printed invitation cards with

2020-08-25 09:08:38 33

原创 『杭电1534』Schedule Problem

Problem DescriptionA project can be divided into several parts. Each part should be completed continuously. This means if a part should take 3 days, we should use a continuous 3 days do complete it. There are four types of constrains among these parts w

2020-08-25 09:06:26 39

原创 『杭电1533』Going Home

Problem DescriptionOn a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, to an adjacent point. For each little man, you need to pay a $1 travel fee for every st

2020-08-25 09:02:52 27

原创 『杭电1532』Drainage Ditches

Problem DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to regrow. Thus, Farmer John has built a set of drain

2020-08-25 08:58:54 36

原创 『杭电1531』King

Problem DescriptionOnce, in one kingdom, there was a queen and that queen was expecting a baby. The queen prayed: ``If my child was a son and if only he was a sound king.'' After nine months her child was born, and indeed, she gave birth to a nice son.

2020-08-25 08:54:15 27

原创 题459. 重复的子字符串

Javaclass Solution { public boolean repeatedSubstringPattern(String s) { // 判断鲁棒性 if (s == null || s.length() <= 1) { return false; } int length = s.length(); // 循环判断 for (int i = le...

2020-08-24 00:44:42 32

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

RFID_19.11.5.mix

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

2020-04-28

《单片机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

空空如也

空空如也

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

TA关注的人 TA的粉丝

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