自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(169)
  • 资源 (1)
  • 收藏
  • 关注

原创 2048--c++游戏2018-8-23-18-24

#include <iostream>#include <bits/stdc++.h>#include <time.h>#include <conio.h>#include <windows.h>#include <process.h>using namespace std;int mp[20][20],Siz...

2018-08-23 18:25:32 195

原创 c语言游戏——tank——2018.1.30.18.26版

#include #include #include #include #include #include #define tank_taotal_N 10#define tank_N 3int p1_x=12,p1_y=29,p2_x=19,p2_y=29,p1_ball_x,p1_ball_y,p2_ball_x,p2_ball_y;char map[32][32];cha

2018-01-30 18:26:32 402

原创 我的游戏--恶灵骑士4.0

这次没有bug,所以这次是一个玩法更新,与3.1版本在玩法上不同,玩家可以自行选择版本游戏;在玩法上,这次更像是贪吃蛇(好吧,其实我努力的让自己的第一个游戏不是贪吃蛇,但最终发现自己的游戏越来越像贪吃蛇);在按下wasd键后,人物会自己向确定的方向移动,在摁下方向键(跳跃键)后会执行一次跳跃,然后向跳跃方向,执行普通移动;这就是4.0版本(其实就是 想加上自己新学的函数)。下面是游

2018-01-26 18:45:15 351

原创 TWO NODES HDU - 4587

Suppose that G is an undirected graph, and the value of stab is defined as follows: Among the expression,G -i, -j is the remainder after removing node i, node j and all edges that are directly re...

2018-10-22 20:18:58 234

原创 Doves and bombs UVA - 10765

求割掉一个点后的连通分量个数最多的m个点It is the year 95 ACM (After the Crash of Microsoft). After many years of peace, a war has broken out. Your nation, the island of Evergreen Macros And Confusing Shortcuts (EMACS)...

2018-10-03 15:44:22 270

原创 Network POJ - 1144

A Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N . No two places have the same number. The lines are bi...

2018-10-01 18:25:51 220

原创 顺序表应用7:最大子段和之分治递归法

Submit StatisticProblem Description 给定n(1<=n<=50000)个整数(可能为负数)组成的序列a[1],a[2],a[3],…,a[n],求该序列如a[i]+a[i+1]+…+a[j]的子段和的最大值。当所给的整数均为负数时定义子段和为0,依此定义,所求的最优值为: Max{0,a[i]+a[i+1]+…+a[j]},1<=i&lt...

2018-09-29 10:43:55 411

原创 顺序表应用6:有序顺序表查询

Problem Description顺序表内按照由小到大的次序存放着n个互不相同的整数,任意输入一个整数,判断该整数在顺序表中是否存在。如果在顺序表中存在该整数,输出其在表中的序号;否则输出“No Found!"。Input 第一行输入整数n (1 <= n <= 100000),表示顺序表的元素个数;第二行依次输入n个各不相同的有序非负整数,代表表里的元素;第三行输...

2018-09-27 20:00:05 161

原创 顺序表应用4-2:元素位置互换之逆置算法(数据改进)

Submit StatisticProblem Description一个长度为len(1<=len<=1000000)的顺序表,数据元素的类型为整型,将该表分成两半,前一半有m个元素,后一半有len-m个元素(1<=m<=len),设计一个时间复杂度为O(N)、空间复杂度为O(1)的算法,改变原来的顺序表,把顺序表中原来在前的m个元素放到表的后段,后len-m个元...

2018-09-27 19:43:35 368

原创 顺序表应用5:有序顺序表归并

Submit StatisticProblem Description已知顺序表A与B是两个有序的顺序表,其中存放的数据元素皆为普通整型,将A与B表归并为C表,要求C表包含了A、B表里所有元素,并且C表仍然保持有序。Input 输入分为三行:第一行输入m、n(1<=m,n<=10000)的值,即为表A、B的元素个数;第二行输入m个有序的整数,即为表A的每一个元素;...

2018-09-27 19:42:45 275

原创 有向图的强连通分量Kosaraju算法&&迷宫城堡 HDU - 1269

为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N<=10000)和M条通道(M<=100000),每个通道都是单向的,就是说若称某通道连通了A房间和B房间,只说明可以通过这个通道由A房间到达B房间,但并不说明通过它可以由B房间到达A房间。Gardon需要请你写个程序确认一下是否任意两个房间都是相互连通的,即:对于任意的i和j,至少存在一条路径可以从房间i到房间j,...

2018-09-20 20:55:51 139

原创 QueryreuQ Gym - 101806Q

StatementsA string is palindrome, if the string reads the same backward and forward. For example, strings like "a", "aa", "appa", "queryreuq" are all palindromes.For given empty string S, you shou...

2018-09-20 18:19:25 343

原创 顺序表应用3:元素位置互换之移位算法

Problem Description一个长度为len(1<=len<=1000000)的顺序表,数据元素的类型为整型,将该表分成两半,前一半有m个元素,后一半有len-m个元素(1<=m<=len),借助元素移位的方式,设计一个空间复杂度为O(1)的算法,改变原来的顺序表,把顺序表中原来在前的m个元素放到表的后段,后len-m个元素放到表的前段。注意:先将顺序表元素...

2018-09-19 14:50:20 137

原创 顺序表应用2:多余元素删除之建表算法

 StatisticProblem Description一个长度不超过10000数据的顺序表,可能存在着一些值相同的“多余”数据元素(类型为整型),编写一个程序将“多余”的数据元素从顺序表中删除,使该表由一个“非纯表”(值相同的元素在表中可能有多个)变成一个“纯表”(值相同的元素在表中只保留第一个)。要求:       1、必须先定义线性表的结构与操作函数,在主函数中借助该定义与操作...

2018-09-19 14:18:50 282

原创 顺序表应用1:多余元素删除之移位算法

Problem Description一个长度不超过10000数据的顺序表,可能存在着一些值相同的“多余”数据元素(类型为整型),编写一个程序将“多余”的数据元素从顺序表中删除,使该表由一个“非纯表”(值相同的元素在表中可能有多个)变成一个“纯表”(值相同的元素在表中只保留第一个)。要求:       1、必须先定义线性表的结构与操作函数,在主函数中借助该定义与操作函数调用实现问题功能;...

2018-09-18 11:08:00 106

原创 A计划 HDU - 2102

可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的骑士LJ肯定能将她救出。现据密探所报,公主被关在一个两层的迷宫里,迷宫的入口是S(0,0,0),公主的位置用P表示,时空传输机用#表示,墙用*表示,...

2018-09-18 09:37:01 134

原创 The Suspects POJ - 1611

Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to s...

2018-09-13 19:07:37 139

原创 Wireless Network POJ - 2236

An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in the n...

2018-09-12 15:24:28 132

原创 Trace

There's a beach in the first quadrant. And from time to time, there are sea waves. A wave ( xxx , yyy ) means the wave is a rectangle whose vertexes are ( 000 , 000 ), ( xxx , 000 ), ( 000 , yyy ), ( ...

2018-09-11 16:50:38 171

原创 Made In Heaven

One day in the jail, F·F invites Jolyne Kujo (JOJO in brief) to play tennis with her. However, Pucci the father somehow knows it and wants to stop her. There are NNN spots in the jail and MMM roads co...

2018-09-10 20:17:17 409

原创 Punching Power

The park management finally decided to install some popular boxing machines at various strategic places in the park. In fact, to compensate for the previous lack of machines, they decided to install a...

2018-09-08 20:41:37 199

原创 星系碰撞 FZU - 2194

据预测,大约在100亿年后,狮子座星系将与银河系发生碰撞,两个星系的碰撞将会合并两个星系,但是没有2个星球会相撞。现在某科学家得到两个星系合并后的结果,一些二维平面上的点,但是不知道那些星球属于银河系,已知如果两个星球属于同一个星系,那么他们之间的距离大于5光年,这边的距离指的是欧几里得距离,即(x1,y1)与(x2,y2)的距离为sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-...

2018-09-08 20:32:29 216

原创 Ran and the Lock Code Gym - 101778B

StatementsTwo days ago, a woman called Fumiyo Edogawa knocked the door of Kogoro Mouri home and claimed that she is Conan's mom. Fumiyo introduced herself as Conan's mother and used fake documents t...

2018-09-05 15:12:24 303

原创 Just a Hook HDU - 1698

In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same length.Now Pudg...

2018-09-04 09:46:07 119

原创 A Simple Problem with Integers POJ - 3468

You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the ...

2018-09-04 09:16:15 94

原创 Snooker

G Snooker ProblemRonnie owns a very old TV with no sound, and a screen so unclear that letters cannot be read. So when Ronnie watches a Snooker match on TV, he cannot see the current score, nor the ...

2018-08-29 20:06:17 254

原创 Restructuring Company CodeForces - 566D

Even the most successful company can go through a crisis period when you have to make a hard decision — to restructure, discard and merge departments, fire employees and do other unpleasant stuff. Let...

2018-08-27 21:22:07 196 1

原创 I Hate It HDU - 1754

很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<M<5...

2018-08-27 20:57:09 116

原创 岛屿的数量 51Nod - 1276

有N个岛连在一起形成了一个大的岛屿,如果海平面上升超过某些岛的高度时,则这个岛会被淹没。原本的大岛屿则会分为多个小岛屿,如果海平面一直上升,则所有岛都会被淹没在水下。给出N个岛的高度。然后有Q个查询,每个查询给出一个海平面的高度H,问当海平面高度达到H时,海上共有多少个岛屿。例如:岛屿的高度为:{2, 1, 3, 2, 3}, 查询为:{0, 1, 3, 2}。当海面高度为0时,所有的...

2018-08-25 09:44:18 103

原创 4个数和为0 51Nod - 1267

给出N个整数,你来判断一下是否能够选出4个数,他们的和为0,可以则输出"Yes",否则输出"No"。Input第1行,1个数N,N为数组的长度(4 <= N <= 1000) 第2 - N + 1行:Aii(-10^9 <= Aii <= 10^9)Output如果可以选出4个数,使得他们的和为0,则输出"Yes",否则输出"No"。Sample In

2018-08-24 20:55:49 157

原创 Phalanx HDU - 2859

Today is army day, but the servicemen are busy with the phalanx for the celebration of the 60th anniversary of the PRC. A phalanx is a matrix of size n*n, each element is a character (a~z or A~Z), st...

2018-08-24 09:30:17 135

转载 HDU--1078--FatMouse and Cheese--记忆化搜索

转载:https://blog.csdn.net/jingdianitnan/article/details/41546005在这里致歉:此文章没有经过博主同意私自转载,若博主发现,可在下方评论,与我私聊解决HDU--1078--FatMouse and Cheese--记忆化搜索2014年11月27日 15:31:31 阅读数:596更多个人分类: 深搜DP FatMou...

2018-08-22 21:01:32 140

原创 Treats for the Cows &&区间DP

FJ has purchased N (1 <= N <= 2000) yummy treats for the cows who get money for giving vast amounts of milk. FJ sells one treat per day and wants to maximize the money he receives over a given p...

2018-08-22 09:03:42 115

原创 Help Jimmy

"Help Jimmy" 是在下图所示的场景上完成的游戏。 场景中包括多个长度和高度各不相同的平台。地面是最低的平台,高度为零,长度无限。 Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒。当Jimmy落到某个平台上时,游戏者选择让它向左还是向右跑,它跑动的速度也是1米/秒。当Jimmy跑到平台的边缘时,开始继续下落。Jimmy每次下落的高度不能超过MAX...

2018-08-21 11:56:16 180

原创 Common Subsequence

A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, ..., xm > another sequence Z = < z1, z2, ..., zk > is a ...

2018-08-20 20:35:15 123

原创 FatMouse's Speed

FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as large a subset of this data as possible into a sequence...

2018-08-20 10:05:03 330

原创 Tickets

Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go back home as early as...

2018-08-20 09:14:38 197

原创 Find them, Catch them

警方决定捣毁两大犯罪团伙:龙帮和蛇帮,显然一个帮派至少有一人。该城有N个罪犯,编号从1至N(N<=100000。将有M(M<=100000)次操作。D a b 表示a、b是不同帮派A a b 询问a、b关系Input多组数据。第一行是数据总数 T (1 <= T <= 20)每组数据第一行是N、M,接下来M行是操作Output对于每一个A操作,回答"In...

2018-08-17 20:48:46 225

原创 Ignatius and the Princess IV

"OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, and then N integers. There will be a special integer among them, you have to te...

2018-08-17 10:37:45 116

原创 Max Sum Plus Plus

Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more difficult problem. Given...

2018-08-17 10:13:52 343

经典c语言游戏坦克大战

c语言游戏,有利于启蒙游戏开发,好玩不贵,游戏中尽可能的模仿经典坦克大战

2018-02-10

空空如也

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

TA关注的人

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