自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

=_=

  • 博客(40)
  • 收藏
  • 关注

原创 斯特林近似

斯特林公式是用来求大数阶乘的公式π=acos(-1)e = 2.718281828459

2017-01-31 18:00:01 442

原创 POJ-3268 Silver Cow Party (Dijkstra求有向图最短路)

Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 19722 Accepted: 9022 DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the bi

2016-12-05 17:15:53 565

原创 Codeforces Beta Round #61 (Div. 2) B. Petya and Countryside (DP)

time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Little Petya often travels to his grandmother in the countryside. The grandmother has a lar

2016-12-05 15:54:14 328

原创 HDU-5744 Keep On Movin(回文串 贪心)

Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1030 Accepted Submission(s): 725Problem Description Professor Zhang has kinds of characters

2016-11-28 17:30:21 271

原创 HDU-2544 最短路(Dijkstra算法求无向图最短路模板题)

最短路Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 57379 Accepted Submission(s): 25280Problem Description 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shir

2016-11-28 16:51:05 1487

原创 Codeforces Round #209 (Div. 2) B. Alyona and flowers

B. Permutation time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output A permutation p is an ordered group of numbers p1,   p2,   …,   pn, consisti

2016-11-28 15:46:08 309

原创 Codeforces Round #209 (Div. 2) A.Table

time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Simon has a rectangular table consisting of n rows and m columns. Simon numbered the rows of

2016-11-28 15:34:51 258

原创 Codeforces Round #381 (Div. 2) A.Alyona and copybooks

time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Little girl Alyona is in a shop to buy some copybooks for school. She study four subjects so

2016-11-24 17:47:58 284

原创 链式前向星存储实现BFS

代码:/************************************************************************* > File Name: store.cpp > Author: SIU > Created Time: 2016年11月24日 星期四 13时34分39秒 *******************************

2016-11-24 16:45:44 374

转载 深度理解链式前向星

深度理解链式前向星 <div class="article_manage clearfix"> <div class="article_r"> <span class="link_postdate">2013-11-23 16:55</span> <span class="link_view" tit

2016-11-24 16:27:21 243

原创 HDU 5500 Reorder the Books (规律)

Reorder the BooksTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1416 Accepted Submission(s): 742Problem Description dxy has a collection

2016-11-23 00:22:49 293

原创 最长递增子序列 动态规划基础

1134 最长递增子序列 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 给出长度为N的数组,找出这个数组的最长递增子序列。(递增子序列是指,子序列的元素是递增的) 例如:5 1 6 8 2 4 5 10,最长递增子序列是1 2 4 5 10。 Input 第1行:1个数N,N为序列的长度(2 <= N <= 50000) 第2 - N + 1

2016-11-21 19:40:48 285

原创 UVA 11624 Fire

Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe escape the maze. Given Joe’s location in the

2016-11-16 21:22:28 294

原创 HDU 1495 非常可乐

非常可乐Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 11756 Accepted Submission(s): 4738Problem Description 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不

2016-11-16 21:05:31 342

原创 HDU 1010 Tempter of the Bone(奇偶剪枝)

Tempter of the BoneTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 111149 Accepted Submission(s): 30144Problem Description The doggie found

2016-11-16 20:56:25 231

原创 POJ 2676 Sudoku

Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 18838 Accepted: 9078 Special Judge DescriptionSudoku is a very simple task. A square table with 9 rows and 9 columns is div

2016-11-16 17:50:35 193

转载 ACM题集以及各种总结大全

ACM题集以及各种总结大全!        虽然退役了,但是整理一下,供小弟小妹们以后切题方便一些,但由于近来考试太多,顾退役总结延迟一段时间再写!先写一下各种分类和题集,欢迎各位大牛路过指正。        一.ACM入门        关于ACM    百度百科连接        杭州电子科技大学(hdu)ACM题目    连接        关于acm的帮助     连接        北京大

2016-11-01 20:50:37 9719 1

原创 CF #222 div1 A Maze

A. Maze time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Pavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell is

2016-10-22 13:32:15 531 1

原创 CF #377div2C Sanatorium

C. Sanatorium time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Vasiliy spent his vacation in a sanatorium, came back and found that he compl

2016-10-18 12:27:39 372

原创 HDU 1016 Prime Ring Problem

Prime Ring ProblemTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 43965 Accepted Submission(s): 19481Problem Description A ring is compose

2016-10-17 18:58:13 176

原创 HDU1728 逃离迷宫

逃离迷宫Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 23212 Accepted Submission(s): 5709Problem Description   给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,

2016-10-15 16:59:08 165

原创 HDU2717 Catch That Cow

Catch That CowTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 12690 Accepted Submission(s): 3924Problem Description Farmer John has been in

2016-10-15 16:48:38 211

原创 POJ 2251 Dungeon Master

Dungeon Master Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 27449 Accepted: 10750 DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dung

2016-10-13 20:51:22 175

原创 POJ 3984 迷宫问题

迷宫问题 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16582 Accepted: 9890 Description定义一个二维数组: 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,

2016-10-11 15:56:11 163

原创 第二章 算法基础

2.1 插入排序(Insertion-Sort): 时间复杂度:O(n²) 对于少量元素的排序,是一个有效的算法。 为什么叫插入排序呢? 可以类比扑克牌整牌 将未排序的数字通过遍历插入到已排好序的数字中的对应位置 如何实现呢 #include #include using namespace std; int main() { int n,num[10000];

2016-09-29 21:47:15 203

原创 第一章 算法在计算中的作用

东西很少 没什么可写的 就是从第二章开始强迫症受不了== 以上

2016-09-29 21:46:10 205

原创 CF #370 div2 B. Memory and Trident

B. Memory and Trident time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Memory is performing a walk on the two-dimensional plane, starting a

2016-09-23 11:38:42 212

原创 POJ 1003 Hangover

Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 119183 Accepted: 58279 DescriptionHow far can you make a stack of cards overhang a table? If you have one card, you can create a

2016-09-22 17:24:50 167

原创 CF #371 div2 B. Filya and Homework

B. Filya and Homework time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Today, hedgehog Filya went to school for the very first time! Teacher

2016-09-15 22:06:17 220

原创 QDU07 GZS与小公园

GZS与小公园 发布时间: 2015年9月6日 15:18 最后更新: 2016年6月30日 21:57 时间限制: 3000ms 内存限制: 256M描述 某天GZS漫步在学校新建的小公园,他发现那里建成了一些水池和小河道。我们暂且把它们统一看成水池。假设公园旁有一张小公园的地图,上面仅标识了此处是否是水池,你能帮GZS计算出该地图中一共有几个水池吗。输入 第一行输入一个整数N,

2016-09-13 15:34:53 445

原创 QDU 18 反转数字

反转数字 发布时间: 2015年10月3日 21:07 时间限制: 100ms 内存限制: 256M描述 输入一个 c 语言 4字节 int 范围内的数字,输出它反转后的数字。比如12345反转后是54321,-12345反转后是-54321。如果反转后的数字不在 int 范围内就输出0;输入 每行一个 int 范围内的数字,以 EOF 结尾。输出 输出反转后的数字,每行一个样例输入

2016-08-31 22:54:31 353

原创 洛谷 P1403 约数研究

题目地址:http://www.luogu.org/problem/show?pid=1403 题目描述科学家们在Samuel星球上的探险得到了丰富的能源储备,这使得空间站中大型计算机“Samuel2”的长时间运算成为了可能。由于在去年一年的辛苦工作取得了不错的成绩,小联允许用“Samuel2”进行数学研究。小联最近在研究和约数有关的问题,他统计每个正数N的约数的个数,并以f(N)来表示。现在小联

2016-08-16 12:46:39 464 1

原创 HDU 2289 Cup

CupTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7880 Accepted Submission(s): 2383Problem Description The WHU ACM Team has a big cup, wit

2016-08-12 12:06:40 217

原创 HDU 1338 Game Prediction

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1338 Game PredictionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1206 Accepted Submission

2016-08-01 17:30:19 239

原创 CF #252 div2 B - Valera and Fruits

题目地址:http://codeforces.com/contest/441/problem/B B. Valera and Fruits time limit per test1 second memory limit per test256 megabytes inputstandard input outputst

2016-07-30 17:49:21 218

原创 POJ 1107 W's Cipher

题目地址:http://poj.org/problem?id=1107 W’s Cipher Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 5524 Accepted: 2761 DescriptionWeird Wally’s Wireless Widgets, Inc. manufactures a

2016-07-29 15:24:47 303

原创 HDU 1361 Parencodings

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1361 ParencodingsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 877 Accepted Submission(s):

2016-07-27 12:15:12 262

原创 CF #357 div2 B Economy Game

B. Economy Game time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Kolya is developing an economy simulator game. His most favourite part of t

2016-06-15 16:47:54 286

原创 PAT 天梯赛 L1-009 N个数求和

本题的要求很简单,就是求N个数字的和。麻烦的是,这些数字是以有理数“分子/分母”的形式给出的,你输出的和也必须是有理数的形式。 输入格式: 输入第一行给出一个正整数N( 输出格式: 输出上述数字和的最简形式 —— 即将结果写成“整数部分 分数部分”,其中分数部分写成“分子/分母”,要求分子小于分母,且它们没有公因子。如果结果的整数部分为0,则只输出分数部分。 输入样例1: 5 2/5

2016-06-03 15:18:15 585

转载 欢迎使用CSDN-markdown编辑器

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦: Markdown和扩展Markdown简洁的语法 代码块高亮 图片链接和图片上传 LaTex数学公式 UML序列图和流程图 离线写博客 导入导出Markdown文件 丰富的快捷键 快捷键 加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl

2016-06-01 16:17:29 169

空空如也

空空如也

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

TA关注的人

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