自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Focus5679的博客

记录个人代码用

  • 博客(25)
  • 资源 (1)
  • 收藏
  • 关注

转载 测试函数(算法)运行时间

利用clock函数测试函数(算法)解决问题用时#include <iostream> #include<cstdio> #include<cstdlib> #include<algorithm> #include<queue> #include<cmath> #include<cstring> #include &

2018-04-28 12:48:05 851

原创 KMP算法代码实现

KMP算法的核心思想是避免匹配失败时重新从短串的第一个字符开始匹配,从而提高匹配效率。#include <iostream> #include<cstdio> #include<cstdlib> #include<algorithm> #include<queue> #include<cmath> #include<cs...

2018-04-26 15:00:27 15538 5

原创 第一届湖北省赛F. Flower Road

F. Flower RoadOnce upon a time, there was a beautiful princess named TQM, and a handsome prince named GSS. One day, the prince would like to visit the princess. While in front of the princess' house, ...

2018-04-23 20:48:14 176

原创 Hopscotch POJ - 3050

Hopscotch POJ - 3050 The cows play the child's game of hopscotch in a non-traditional way. Instead of a linear set of numbered boxes into which to hop, the cows create a 5x5 rectilinear grid of digits...

2018-04-20 18:44:37 125

原创 Network Saboteur FZU - 1346

Network Saboteur FZU - 1346 A university network is composed of N computers. System administrators gathered information on the traffic between nodes, and carefully divided the network into two subnetw...

2018-04-18 21:45:53 215

原创 A Knight's Journey POJ - 2488

A Knight's Journey POJ - 2488 Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight mo...

2018-04-17 22:33:27 142

原创 Sudoku POJ - 2676

Sudoku  POJ - 2676   Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal dig...

2018-04-16 19:28:52 191

原创 Square POJ - 2362

  Square  POJ - 2362        Given a set of sticks of various lengths, is it possible to join them end-to-end to form a square? Input The first line of input contains N, the number of test case...

2018-04-15 14:20:47 177

原创 逃离迷宫 HDU - 1728

逃离迷宫  HDU - 1728     给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,gloria是个没什么方向感的人,因此,她在行走过程...

2018-04-15 11:46:08 239 1

原创 A - 棋盘问题 POJ - 1321

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

2018-04-13 16:57:39 126

原创 Curling 2.0 POJ - 3009

Curling 2.0 POJ - 3009On Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which...

2018-04-12 17:04:23 117

原创 放苹果

放苹果 把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。Input第一行是测试数据的数目t(0 <= t <= 20)。以下每行均包含二个整数M和N,以空格分开。1<=M,N<=10。Output对输入的每组数据M和N,用一行输出相应的K。Sample Input1 7 3 Sample ...

2018-04-11 22:31:34 222

原创 蜘蛛牌 HDU - 1584

蜘蛛牌 蜘蛛牌是windows xp操作系统自带的一款纸牌游戏,游戏规则是这样的:只能将牌拖到比她大一的牌上面(A最小,K最大),如果拖动的牌上有按顺序排好的牌时,那么这些牌也跟着一起移动,游戏的目的是将所有的牌按同一花色从小到大排好,为了简单起见,我们的游戏只有同一花色的10张牌,从A到10,且随机的在一行上展开,编号从1到10,把第i号上的牌移到第j号牌上,移动距离为abs(i-j),现在你要...

2018-04-11 21:12:16 228

原创 Meteor Shower POJ - 3669

    Meteor Shower POJ - 3669 Bessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into earth and destroy anything they hit. Anxious for her safety, she...

2018-04-10 17:02:55 219

原创 Fence Repair POJ - 3253

Fence Repair POJ - 3253 Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some in...

2018-04-09 18:34:58 72

原创 Chessboard

ChessboardMagnus decided to play a classic chess game. Though what he saw in his locker shocked him! His favourite chessboard got broken into 4 pieces, each of size n by n, n is always odd. And what's...

2018-04-09 12:28:57 382

原创 L - Oil Deposits HDU - 1241

L - Oil Deposits HDU - 1241 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...

2018-04-08 21:14:06 160

原创 Lecture Sleep

Lecture Sleep Your friend Mishka and you attend a calculus lecture. Lecture lasts n minutes. Lecturer tells ai theorems during the i-th minute.Mishka is really interested in calculus, though it is so ...

2018-04-08 21:13:18 118

原创 Tetris

TetrisYou are given a following process.There is a platform with n columns. 1 × 1 squares are appearing one after another in some columns on this platform. If there are no squares in the column, a squ...

2018-04-08 18:46:48 187

原创 括号配对问题

括号配对问题时间限制:3000 ms  |  内存限制:65535 KB难度:3描述现在,有一行括号序列,请你检查这行括号是否配对。输入第一行输入一个数N(0<N<=100),表示有N组测试数据。后面的N行输入多组输入数据,每组输入数据都是一个字符串S(S的长度小于10000,且S不是空串),测试数据组数少于5组。数据保证S中只含有"[", "]", "(", ")" 四种字符输出每组...

2018-04-07 18:37:41 97

原创 房间安排

房间安排时间限制:3000 ms  |  内存限制:65535 KB难度:2描述2010年上海世界博览会(Expo2010),是第41届世界博览会。于2010年5月1日至10月31日期间,在中国上海市举行。本次世博会也是由中国举办的首届世界博览会。上海世博会以“城市,让生活更美好”(Better City,Better Life)为主题,将充分探索21世纪城市生活。这次世博会总投资达450亿人民币...

2018-04-06 14:59:53 221

原创 Cleaning Shifts POJ - 2376

Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow working on cleaning things up and has divided the day i...

2018-04-06 14:22:52 202

原创 B - Dungeon Master POJ - 2251

B - Dungeon Master POJ - 2251 You 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 min...

2018-04-06 12:43:25 276

原创 Lake Counting POJ - 2386

Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square contains ei...

2018-04-03 16:19:24 109

原创 Red and Black POJ - 1979

There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can'...

2018-04-02 20:20:19 148

code-data.zip

HotRing: A Hotspot-Aware In-Memory Key-Value Store 阅读报告 代码与数据资源

2020-06-09

空空如也

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

TA关注的人

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