自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(27)
  • 收藏
  • 关注

原创 HYSBZ - 5313

题目:给定n, 求斐波那契数列F(n) = F(n - 1) + F(n - 2)的第n项模5的值Input第一行为一个整数T, 表示有T (<= 1e6)个询问。接下来有T个整数ni(<= 2e9)。OutputT行,对每个询问输出答案。Sample Input91 2 3 4 5 6 7 8 9Sample Output112303314代码...

2019-05-08 08:47:40 158

原创 hdu1686

题目:求模式串在待匹配串中的出现次数。Input第一行是一个数字T,表明测试数据组数。之后每组数据都有两行:第一行为模式串,长度不大于10,000;第二行为待匹配串,长度不大于1,000,000。(所有字符串只由大写字母组成)Output每组数据输出一行结果。Sample Input4ABCDABCDSOSSOSOSOSCDCDCDCCDCKMPSOEASYSam...

2019-05-07 19:29:56 303

原创 Gym - 101911J //欧几里得

题目:Monocarp has decided to buy a new TV set and hang it on the wall in his flat. The wall has enough free space so Monocarp can buy a TV set with screen width not greater than a and screen height not...

2019-04-08 21:10:08 123

原创 LightOJ - 1005

题目:A rook is a piece used in the game of chess which is played on a board of square grids. A rook can only move vertically or horizontally from its current position and two rooks attack each other if...

2019-04-03 15:07:49 134

原创 HYSBZ-s456

给你一个n个数的数列,其中某个数出现了超过n div 2次即众数,请你找出那个数。Input第1行一个正整数n。第2行n个正整数用空格隔开。Output一行一个正整数表示那个众数。Sample Input53 2 3 1 3Sample Output3Hint100%的数据,n≤500000,数列中每个数≤maxlongint。div意思是除找出大于n/2的数字(不是找...

2019-04-02 18:59:52 87

原创 hdu1176(第二天题G)

题目:都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个身手敏捷的高手,但在现实中运动神经...

2019-02-11 22:17:59 98

原创 hdu1069(第二天题E)

题目:A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the ...

2019-02-11 09:50:46 143

原创 poj3279(第一天H题)

题目:Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M × N grid (1 ≤ M ≤ 15; 1 ≤ N ≤...

2019-02-09 11:50:42 110

原创 poj1426(第一天题I)

题目:Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 200 and t...

2019-02-09 11:34:09 120

原创 hdu2571第一天(G题)

题目:穿过幽谷意味着离大魔王lemon已经无限接近了!可谁能想到,yifenfei在斩杀了一些虾兵蟹将后,却再次面临命运大迷宫的考验,这是魔王lemon设下的又一个机关。要知道,不论何人,若在迷宫中被困1小时以上,则必死无疑!可怜的yifenfei为了去救MM,义无返顾地跳进了迷宫。让我们一起帮帮执着的他吧!命运大迷宫可以看成是一个两维的方格阵列,如下图所示:yifenfei一开始在左上...

2019-02-05 22:14:48 70

原创 hdu1087(第一天题F)

题目:Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now.The game ca...

2019-02-04 18:02:18 112

原创 hdu1505第一天E题

题目:Bob is a strategy game programming specialist. In his new city building game the gaming environment is as follows: a city is built up by areas, in which there are streets, trees,factories and build...

2019-02-03 11:16:17 85

原创 hdu1506(1505前置)

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1506题目要求求出最大的面积,那就从左向右检索例2 1 2 2思路:知道假如一直是 1 2 3 4这样递增的情况,那么面积就是41或32或23或41中最大的那个代入例子中,先放入221:21(高度乘以长度)放入1 发现1比2小,后面无论多大也无法再与第一个2联动了所以把2也变成11...

2019-02-03 11:13:06 75

原创 HDU - 2049(第五天I题)

国庆期间,省城HZ刚刚举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪临时想出了有一个有意思的节目,叫做"考新郎",具体的操作是这样的:首先,给每位新娘打扮得几乎一模一样,并盖上大大的红盖头随机坐成一排;然后,让各位新郎寻找自己的新娘.每人只准找一个,并且不允许多人找一个.最后,揭开盖头,如果找错了对象就要当众跪搓衣板…看来做新郎也不是容易的事情…假设一共有N对新婚夫妇,其中有M...

2019-01-29 16:40:30 65

原创 hdu1213(倒数第三天G题)

Today is Ignatius’ birthday. He invites a lot of friends. Now it’s dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the friends know each other, a...

2019-01-28 20:59:46 214

原创 hdu1059(倒数第二天第二题)

题目:Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the marbles had the sa...

2019-01-28 15:53:44 153

原创 hdu2845(第四次D)

Bean-eating is an interesting game, everyone owns an MN matrix, which is filled with different qualities beans. Meantime, there is only one bean in any 11 grid. Now you want to eat the beans and colle...

2019-01-27 11:38:11 108

原创 HDU - 1171(第四次B题)

Nowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don’t know that Computer College had ever been split into Computer College and Software College in 2002.Th...

2019-01-26 20:30:02 151

原创 HDU2159(第三天第四题)

最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的经验,并减掉相应的忍耐度。当忍耐度降到0或者0以下时,xhd就不会玩这游戏。xhd还说了他最多只杀s只怪。请问他能升掉这最后一级吗?Inpu...

2019-01-25 10:31:04 77

原创 第二期白银组第七题

统计每个元音字母在字符串中出现的次数。Input输入数据首先包括一个整数n,表示测试实例的个数,然后是n行长度不超过100的字符串。Output对于每个测试实例输出5行,格式如下:a:num1e:num2i:num3o:num4u:num5多个测试实例之间由一个空行隔开。请特别注意:最后一块输出后面没有空行:)Sample Input2aeioumy name is ...

2018-12-14 20:44:39 113

原创 第二期白银组第八题

统计每个元音字母在字符串中出现的次数。Input输入数据首先包括一个整数n,表示测试实例的个数,然后是n行长度不超过100的字符串。Output对于每个测试实例输出5行,格式如下:a:num1e:num2i:num3o:num4u:num5多个测试实例之间由一个空行隔开。请特别注意:最后一块输出后面没有空行:)Sample Input2aeioumy name is ...

2018-12-14 18:15:33 101

原创 第一期作业第二题

题目:George has recently entered the BSUCP (Berland State University for Cool Programmers). George has a friend Alex who has also entered the university. Now they are moving into a dormitory.George an...

2018-12-07 20:38:17 325

原创 第一期作业第四题

题目:Calculate A + B.InputEach line will contain two integers A and B. Process to end of file.OutputFor each case, output A + B in one line.Sample Input1 1Sample Output2翻译版:计算a+b。输入每一行将包含两个...

2018-12-07 20:13:28 138

原创 第一期作业题6

#include&amp;lt;iostream&amp;gt;#include&amp;lt;stdlib.h&amp;gt;using namespace std;int main(){ char b[10]; while (cin &amp;gt;&amp;gt; b) { int i, j; int temp; for (i = 0; i &amp;lt;= 9; i++) { if

2018-12-07 13:17:54 59

原创 一期作业题7

#include&amp;lt;iostream&amp;gt;#include&amp;lt;stdlib.h&amp;gt;#include&amp;lt;iomanip&amp;gt;using namespace std;#define PI 3.1415927int main(){ double change(double x); double line; double area; while (cin &am

2018-12-07 13:00:04 122 1

原创 一期作业第8题

#include&amp;lt;iostream&amp;gt;#include&amp;lt;stdlib.h&amp;gt;using namespace std;int main(){ int a, b; while (cin &amp;gt;&amp;gt; a &amp;gt;&amp;gt; b) { cin &amp;gt;&amp;gt; a &amp;gt;&a

2018-12-07 12:59:32 150 1

原创 一期作业第一题

一期作业,第一题。#include&amp;lt;iostream&amp;gt;#include&amp;lt;stdlib.h&amp;gt;using namespace std;int main(){ char old[220]; cin &amp;gt;&amp;gt; old; //int v; //int over; //for (v = 0; v &amp;lt;= 100; v++) //{

2018-12-07 12:57:51 115

空空如也

空空如也

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

TA关注的人

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