自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Problem H. Holes

You may have seen a mechanic typewriter — such devices were widespread just 15 years ago, beforecomputers replaced them. It is a very simple thing. You strike a key on the typewriter keyboard, the

2017-03-30 23:56:20 561

转载 STL之set篇

关于set有下面几个问题:(1)为何map和set的插入删除效率比用其他序列容器高?大部分人说,很简单,因为对于关联容器来说,不需要做内存拷贝和内存移动。说对了,确实如此。set容器内所有元素都是以节点的方式来存储,其节点结构和链表差不多,指向父节点和子节点。结构图可能如下:   A   / \  B C / \ / \  D E F

2017-03-30 18:40:48 223

原创 hdu 4585 shaolin Stl--map

Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin temple every year, trying to be a monk there. The master of Shaolin evaluates a young man mainly by his talent on un

2017-03-30 17:13:36 327

原创 sTL 之map篇

Map是c++的一个标准容器,她提供了很好一对一的关系,在一些程序中建立一个map可以起到事半功倍的效果,总结了一些map基本简单实用的操作!1. map最基本的构造函数;   mapmapstring;         mapmapint;   mapmapstring;         mapmapchar;   mapmapchar;            mapmapint

2017-03-30 17:03:35 473

原创 B - Foosball Dynasty

桌游游戏题意就是告诉你Balaji and his coworkers like to play Foosball on their lunch break. Foosball is a game typicallyplayed by 2 players (individual matchup) or 4 players (team play). However, due to the i

2017-03-29 20:50:05 558

原创 Gym 101196D Lost in Translation (bfs)

打比赛的时候没来得及看这道题目,现在补上题目大意就是给你一篇文章,初始状态是英文,然后给出以多种语言,和一些语言之间翻译需要的成本,然后问你找出在翻译成所有语言的最低成本,但是这里还有一个条件特别重要,那就是救过必须要满足翻译成某种语言的过程必须是最短路径,理解一下,对某一种语言来说也就是求一下该语言的所有最短路径中的最低成本思路:首先先建一下图了当然是,这种题不用看,将字符串转化

2017-03-29 20:44:04 387

原创 cf 785 C - Anton and Fairy Tale

Anton likes to listen to fairy tales, especially when Danik, Anton's best friend, tells them. Right now Danik tells Anton a fairy tale:"Once upon a time, there lived an emperor. He was very rich and

2017-03-29 20:13:21 437

原创 cf 785 水题

A - Anton and Polyhedrons Anton's favourite geometric figures are regular polyhedrons. Note that there are five kinds of regular polyhedrons:Tetrahedron. Tetrahedron has 4 triangular faces.Cub

2017-03-29 19:57:10 1095

原创 Problem E Red Rover kmp

One of our older Mars Rovers has nearly completed its tour of duty and is awaiting instructionsfor one last mission to explore the Martian surface. The survey team has picked a route and hasentrus

2017-03-26 16:57:49 419

原创 ECNA2016ProblemC:TheKeytoCryptography 水题

Supposeyouneedtoencryptatopsecretmessagelike“SENDMOREMONKEYS". Youcoulduse a simple substitution cipher, where each letter in the alphabet is replaced with a different letter.However,theseciphersa

2017-03-26 16:55:40 662

原创 poj 2251 bfs基础

DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one

2017-03-22 21:33:50 309

原创 poj1321 棋盘问题 dfs

在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <= n 当为-1...

2017-03-22 20:48:16 267

原创 Gym - 101246D Fire in the Country 搜索

This summer's heat wave and drought unleashed devastating wildfires all across the Earth. Of course, a tiny country on the island "Yars and Eva" is also affected by this ecological disaster. Thanks to

2017-03-21 20:34:10 465

原创 hdu 2612 Find a way

Problem DescriptionPass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki.Yifenfe

2017-03-21 20:11:05 213

原创 hdu1495 非常可乐 bfs基础

大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间可以相互倒可乐 (都是没有刻度的,且 S==N+M,101>S>...

2017-03-21 15:59:03 1061

原创 HDU 1241 Oil Deposits dfs

The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides th...

2017-03-20 21:09:48 263

原创 HDU 3984 迷宫问题

定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。 Input一个5

2017-03-20 20:32:02 1207

原创 Gym - 101257G 24

Round 16,777,216 of Codeforce-is has just finished, and all the contestants were able to pass the pretests in problem A.Maike, the founder of Codeforce-is wants to measure how weak the tests for pro

2017-03-17 21:28:23 348

原创 Gym - 101257H card

After Hasan ruined the Worm puzzle, Rula brought a new game to the office, the Card game.The game has a group of cards, each card has an integer value Vi written on it.Initially, N cards are

2017-03-17 16:01:07 360

原创 Gym - 101257E Another Step-by-Step Pupil

Hamza is a new intern at Mixed Dimensions, and he's learning the basics about 3D models. Hasan gave him an easy task on his first day, he has to count the number of boundary edges in a 3D mesh.A b

2017-03-17 15:52:56 308

原创 Gym - 101257D !Hasan

Mixed Dimensions Onsite Round will host N contestants this year.Moath and Saif have been preparing the contest hall, Moath needs X minutes to set up a computer for the contest, while Saif needs

2017-03-17 15:46:12 800

原创 Gym - 101246F - Elevator

input.txt / output.txtStatementsThe Berland State Building is the highest building in the capital of Berland. Curious Polikarp was studying the principle of operation of an elevator in the Berla

2017-03-14 20:39:32 451

原创 Gym - 101246 E - Kidnapping

input.txt / output.txtStatementsBerland's Police has a serious problem. A foreign ambassador arrived to Berland with an important mission, and his daughter was kidnapped just from the Royal Pala

2017-03-14 20:31:59 453

原创 中国(北方)大学生程序设计训练赛(第一周)E. water problem

函数 f:Z+→Zf:Z+→Z。已知 f(1),f(2)f(1),f(2) 的值,且对于任意 x>1x>1,有 f(x+1)=f(x)+f(x−1)+sin(πx2)f(x+1)=f(x)+f(x−1)+sin⁡(πx2)。求 f(n)f(n的值多组数据。(数据组数 T≤100T≤100)每组数据包含 33 个不超过 109109 的正整数,分别代表 f(1),f(

2017-03-11 16:31:48 522

原创 non-random numbers

Vasya is a schoolboy who was playing around with a random number generator and noticed that it never generates numbers with the value of a specific digit equal to the position of that digit in the

2017-03-11 11:34:11 434

原创 Sphenic numbers

Schoolboy Vasya is interested in the problem of distinguishinghas decided to develop his own testing method for it. Unfortunately, the new algorithm has one deficiency – it yieldin case with so-

2017-03-11 11:29:36 368

原创 Weather Station

Albert is a well-known inventor. He’s the one who designed an electronic weather station that periodically track all kinds of weather parameters and records the results of its measurements. While

2017-03-11 11:25:43 437

原创 Fried Fish

It is a well-known fact that Rybinsk once used to be a great fishing spot. People who lived in this town had fish for breakfast, lunch, and dinner. And whatever they could not eat themselves, they

2017-03-11 11:19:18 751

原创 矩阵快速幂模板

(1)矩阵乘法简单的说矩阵就是二维数组,数存在里面,矩阵乘法的规则:A*B=C其中c[i][j]为A的第i行与B的第j列对应乘积的和,即:(1)矩阵快速幂就是算A^n;方法很简单,把快速幂算法中的乘法改成矩阵的乘法就可以了利用二分的思想然后把所有的数换为具有相同作用的矩阵即可(在快速幂中刚开始需要用1乘,而在矩阵快速幂中就要用单位矩阵)

2017-03-08 17:55:46 305

原创 矩阵快速幂 求斐波拉切数列的第n项 poj3070

FibonacciTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7241 Accepted: 5131DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1,

2017-03-08 17:48:10 599

原创 浏览器无法连接的解决方法 windows无法与设备和资源通信的解决方法

在前几天电脑的浏览器突然连不上网了,这给我急得,qq,IE,chrome都试过了都不好使,后来百度了一次啊才知道原来是设置的问题解决方案第一步:控制面板--->网络和Internet--->网络和共享中心--->本地连接--->属性--->Internet 协议版本 4(TCP/IPv4)--->选择"使用下面的DNS服务器地址"--->手工随便输入一个IP,然后确定.第二步:

2017-03-06 12:21:31 13475

空空如也

空空如也

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

TA关注的人

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