自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

NITjianbagengmu的博客

我只是用算法活跃我生锈的大脑

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

原创 Codeforces Round #426 (Div. 2)B. The Festive Evening

B. The Festive Evening time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard outputIt’s the end of July – the time when a festive evening is held at Jell

2017-07-31 20:11:43 255

原创 Codeforces Round #426 (Div. 2) A The Useless Toy

A. The Useless Toy time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard outputWalking through the streets of Marshmallow City, Slastyona have spotted so

2017-07-31 13:45:05 170

原创 hdu 2586

How far away ? Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 2586 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistics

2017-07-30 19:59:59 197

转载 邻接表原理详解

坐在马桶上看算法】算法8:巧妙的邻接表(数组实现)细心的同学会发现,此时遍历边某个顶点边的时候的遍历顺序正好与读入时候的顺序相反。因为在为每个顶点插入边的时候都直接插入“链表”的首部而不是尾部。不过这并不会产生任何问题,这正是这种方法的其妙之处。作者:ahalei来源:51CTO博客|2014-04-08 15:52 移动端 收藏  分享

2017-07-30 09:26:30 1096

原创 Sum HDU 4704

Sum Time Limit: 1000msMemory Limit: 131072KBThis problem will be judged on HDU. Original ID: 4704 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistics Next Type:

2017-07-30 00:25:43 246 1

原创 NIT 股市风云 按位与运算&&&&& F. 休赛季的引援#2

学长出的题都很精华,自己都没法ak G. 股市风云小明的父亲是New Internet Technology And China Maker 公司的总裁,大大大的土豪,每次都会给小明用不完的零花钱。为了小明的成长,他决定让小明用自己的零花钱去股市磨练一下。 他给小明限定了一个特定的股票和n天时间,小明只能买这一只股票,并且他磨练的时间一共只有n天。 而且,因为小明的耐心有限,他最多会买入这只股

2017-07-26 15:22:49 350

原创 hdu 1466

计算直线的交点数 Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 1466 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistics Next

2017-07-20 21:42:05 184

原创 hdu 5400

Arithmetic Sequence Time Limit: 2000msMemory Limit: 65536KB This problem will be judged on HDU. Original ID: 5400 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statis

2017-07-18 09:39:26 213

原创 codeforce round A. Binary Protocol

A. Binary Protocol time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Polycarp has just invented a new binary protocol for data transmission.

2017-07-17 13:06:51 261

原创 code force A. Bear and Five Cards&B. Bear and Finding Criminals

A. Bear and Five Cards time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output A little bear Limak plays a game. He has five cards. There is one n

2017-07-13 22:54:07 315

转载 巴什博弈

下面这段来自白白の屋的文章的一段: 巴什博弈:只有一堆n个物品,两个人轮流从这堆物品中取物,规定每次至少取一个,最多取m个。最后取光者得胜。显然,如果n=m+1,那么由于一次最多只能取m个,所以,无论先取者拿走多少个,后取者都能够一次拿走剩余的物品,后者取胜。因此我们发现了如何取胜的法则:如果n=(m+1)r+s,(r为任意自然数,s≤m),那么先取者要拿走s个物品,如果后取者拿走k(≤m)个,

2017-07-12 22:23:49 383

原创 hdu 2188

悼念512汶川大地震遇难同胞——选拔志愿者 Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 2188 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Stat

2017-07-12 22:22:32 202

原创 B. Black Square

B. Black Square time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Polycarp has a checkered sheet of paper of size n × m. Polycarp painted som

2017-07-12 16:58:04 417

原创 A. Restaurant Tables

A. Restaurant Tables time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output In a small restaurant there are a tables for one person and b tables f

2017-07-12 15:41:11 499

原创 cf697B B. Barnicle

B. Barnicle time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Barney is standing in a bar and starring at a pretty girl. He wants to shoot he

2017-07-11 22:00:59 470

原创 hdu 1338Game Prediction

Game Prediction Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 1338 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistics

2017-07-10 21:50:13 286

原创 hdu 2203

亲和串 Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 2203 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistics Next 人随着岁

2017-07-10 16:45:53 161

原创 任意进制转化 c(c++)

#include<cstdio>#include<iostream>#include<algorithm>#include<cstring>#include<string>#include<queue> #include<map>#include<queue>#include<stack>typedef long long LL;using namespace std;//ma

2017-07-10 13:03:11 253

原创 hdu1421

搬寝室 Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 1421 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistics Next Type

2017-07-09 22:10:59 176

原创 hdu 1420

Prepared for New Acmer Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 1420 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Sta

2017-07-09 16:24:42 260

原创 hdu2270

A. How Many Friends Will Be Together With YouOne day dandelion and her friends decides to play outside. As there are so many people , they decide to divide into several parts . Dandelion wants to know

2017-07-09 10:22:57 194

原创 hdu 2374

A Game with Marbles Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 2374 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statis

2017-07-09 10:20:08 229

原创 hdu 2369

Convert Kilometers to Miles Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 2370 64-bit integer IO format: %I64d Java class name: Main Prev Submit Statu

2017-07-09 10:17:11 317

原创 A. Restoring Password

A. Restoring Passwordtime limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputIgor K. always used to trust his favorite Kashpirovsky Antivirus. That

2017-07-08 09:34:24 336

转载 c++ list, vector, map, set 区别与用法比较

List封装了链表,Vector封装了数组, list和vector得最主要的区别在于vector使用连续内存存储的,他支持[]运算符,而list是以链表形式实现的,不支持[]。Vector对于随机访问的速度很快,但是对于插入尤其是在头部插入元素速度很慢,在尾部插入速度很快。List对于随机访问速度慢得多,因为可能要遍历整个链表才能做到,但是对于插入就快的多了,不需要拷贝和移动数据,只需要

2017-07-08 09:24:57 392

原创 hdu1279

验证角谷猜想 Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 1279 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistics Next 数

2017-07-05 21:12:10 166

原创 hdu 2080

夹角有多大II Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 2080 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistics Next

2017-07-05 15:45:23 273

原创 hdu 1085

Humble Numbers Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 1058 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistics

2017-07-05 14:44:23 170

原创 hdu 1035

Robot Motion Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 1035 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistics N

2017-07-04 21:19:30 235

转载 背包之01背包、完全背包、多重背包详解

背包之01背包、完全背包、多重背包详解PS:大家觉得写得还过得去,就帮我顶博客,谢谢。首先说下动态规划,动态规划这东西就和递归一样,只能找局部关系,若想全部列出来,是很难的,比如汉诺塔。你可以说先把除最后一层的其他所有层都移动到2,再把最后一层移动到3,最后再把其余的从2移动到3,这是一个直观的关系,但是想列举出来是很难的,也许当层数n=3时还可以模拟下,再大一些就不可能了,所以,

2017-07-04 16:17:11 227

原创 poj1005

I Think I Need a Houseboat Time Limit: 1000msMemory Limit: 10000KB This problem will be judged on PKU. Original ID: 1005 64-bit integer IO format: %lld Java class name: Main Prev Submit Status

2017-07-04 10:17:51 150

原创 hdu 3729

Twin Prime Conjecture Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 3792 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Stat

2017-07-03 22:39:57 240

原创 平面分割,空间分割问题(递推关系)(hdu1249、hdu1290、hdu2050)

由这一题可以推一类的问题,首先由直线划分区域到折线划分区域,再延伸到封闭图形划分区域,最后在推广为平面划分空间的问题。(1) n条直线最多分平面问题题目:n条直线,最多可以把平面分为多少个区域。解析: 可能你以前就见过这题目,这充其量是一道初中的思考题。      但一个类型的题目还是从简单的入手,才容易发现规律。      当有n-1条直线时,平面最多被分成了f(n-1)

2017-07-03 19:22:56 534

转载 hdu1232 并查集详解

这个文章是几年前水acm的时候转的, 当时也不知道作者是谁, 要是有人知道的话说一下吧并查集是我暑假从高手那里学到的一招,觉得真是太精妙的设计了。以前我无法解决的一类问题竟然可以用如此简单高效的方法搞定。不分享出来真是对不起party了。(party:我靠,关我嘛事啊?我跟你很熟么?)来看一个实例,杭电1232畅通工程首先在地图上给你若干个城镇,这些城镇都可

2017-07-03 17:06:56 757 3

原创 A. I'm bored with life

A. I’m bored with life time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Holidays have finished. Thanks to the help of the hacker Leha, Noora

2017-07-03 14:38:29 314

原创 B. Crossword solving

B. Crossword solving time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Erelong Leha was bored by calculating of the greatest common divisor o

2017-07-03 14:37:24 580

转载 hdu2086

因为:Ai=(Ai-1+Ai+1)/2 - Ci, A1=(A0 +A2 )/2 - C1; A2=(A1 + A3)/2 - C2 , … => A1+A2 = (A0+A2+A1+A3)/2 - (C1+C2) => A1+A2 = A0+A3 - 2(C1+C2) 同理可得: A1+A1 = A0+A2 - 2(C1)

2017-07-02 16:05:10 238

原创 螺旋矩阵

#include<stdio.h>#define SIZE 10int main(){ int a[SIZE][SIZE]={0}; int N; scanf("%d",&N); //每条边的下标在x,y上的增量 int dx[]={0,1,0,-1}; int dy[]={1,0,-1,0}; int x=0,y=0,nx,ny,i,k=0

2017-07-02 10:16:47 236

原创 hdu 2079

选课时间(题目已修改,注意读题) Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 2079 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistic

2017-07-02 10:11:42 271

转载 hdu2078

复习时间 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6360 Accepted Submission(s): 4668Problem Description 为了能过个好年,xhd开始复习了,于是每天晚上背着书往教室跑。x

2017-07-01 20:01:23 357

空空如也

空空如也

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

TA关注的人

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