自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

hellohelloC的博客

一个真正强大的人,不会把太多心思花在取悦和亲附别人上面。所谓圈子、资源,都只是衍生品。最重要的是提高自己的内功。只有自己修炼好了,才会有别人来亲附。自己是梧桐,凤凰才会来栖;自己是大海,百川才来汇聚,

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

原创 ZOJ 3347 Picture Handling

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3347Picture HandlingTime Limit: 1 Second     Memory Limit: 32768 KB Xiaoyao likes to play with pictures very much. When he

2015-08-21 14:56:11 860

原创 ZOJ 3703 Happy Programming Contest(0-1背包)

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3703Happy Programming ContestTime Limit: 2 Seconds     Memory Limit: 65536 KB In Zhejiang University Programming Contes

2015-08-17 10:48:35 734

原创 ZOJ 1425 Crossed Matchings(动态规划)

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1425Crossed MatchingsTime Limit: 2 Seconds     Memory Limit: 65536 KB There are two rows of positive integer numbers. W

2015-08-17 10:44:48 1029

原创 ZOJ 1610 Count the Colors(线段树,但暴力未必不行)

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1610Description Painting some colored segments on a line, some previously painted segments may be covered by some the subsequen

2015-08-17 10:06:20 686

原创 SGU 202 The Towers of Hanoi Revisited (DFS+预处理)

题目描述:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2338The Towers of Hanoi RevisitedTime Limit: 5 Seconds      Memory Limit: 32768 KB      Special Judge You all must

2015-08-15 11:15:25 1584

原创 POJ 1163 The Triangle(三种搜索方式)

The TriangleDescription7 3 8 8 1 0 2 7 4 4 4 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that sta

2015-08-15 08:51:48 698

原创 ZOJ 1654 Place the Robots(放置机器人)------最大独立集

Place the Robotshttp://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1654Time Limit: 5 Seconds      Memory Limit: 32768 KB Robert is a famous engineer. One day he was given a

2015-08-14 15:35:32 1014

原创 ZOJ 1986 Bridging Signals

Bridging SignalsTime Limit: 2 Seconds      Memory Limit: 65536 KB 'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers ha

2015-08-14 15:01:03 636

原创 Hie with the Pie

http://poj.org/problem?id=3311Hie with the Pie Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 5519 Accepted: 2969DescriptionThe Pizazz Pizzeria prides itself in delivering pizzas

2015-08-10 12:58:46 703

原创 Wireless Network

http://poj.org/problem?id=2236Description 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 a

2015-08-10 11:32:51 740

原创 链表六大解题套路(快慢双指针大法)

链表解题总结

2022-02-26 16:50:30 1144

原创 浅谈lua脚本类装饰器装饰器

最近刚进公司不久,学习了脚本语言Lua,今天重新理解了下装饰器,感觉蛮简单的,就是把一个函数的功能稍微修饰下。1、先看这个简单程序,求几个数的最大值。local function my_max( ... ) return math.max( ... )endprint(my_max(1,2,3))2、假设输入的值不是村数字的话,这时候应该报错,那该怎么实现呢local func

2018-02-01 17:37:59 1572

原创 TCP三次握手和四次握手

TCP是什么?具体的关于TCP是什么,我不打算详细的说了;当你看到这篇文章时,我想你也知道TCP的概念了,想要更深入的了解TCP的工作,我们就继续。它只是一个超级麻烦的协议,而它又是互联网的基础,也是每个程序员必备的基本功。首先来看看OSI的七层模型: 我们需要知道TCP工作在网络OSI的七层模型中的第四层——Transport层,IP在第三层——Network层,ARP在第二层——Dat

2017-10-14 22:48:51 398

原创 排序

排序有很多种,以下介绍几种常用的,效率比较高的: 快排:快排是对起泡排序的一种改进,它的基本思想是,通过一趟排序将待排序元素分割成以关键字为中点独立的两个部分,其中一部分比关键字都小,另外一部分比关键字都大,然后下一轮对两部分再以同样的思路进行排序,直到所有的都排序完成。一趟快速排序具体实现方法如下:假设两边指针为left跟right,初始值分别为a[left],a[r

2017-03-25 13:55:59 413

原创 CF Destroying Array(容器的使用)

Destroying Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array consisting of n non-negative int

2016-10-07 20:39:49 512

原创 http://codeforces.com/contest/721/problem/C Journey(DAG上的dp)

Journeytime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Irina arrived to one of the most famous cities of Berl

2016-10-06 23:45:38 635

原创 树状数组模板

#include#include#include#include#includeusing namespace std;int a[100],n,m;int lowbit(int x){ return x&(-x);}void add(int pos,int x){ while(pos<=n){ a[pos]+=x; pos+=

2016-10-03 15:10:57 292

原创 HDU 5901 Count primes

Count primesTime Limit: 12000/6000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 977    Accepted Submission(s): 524Problem DescriptionEasy question!

2016-09-21 14:03:13 508

原创 HDU 5876 Sparse Graph(补图+BFS最短路)

Sparse GraphTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 617    Accepted Submission(s): 210Problem DescriptionIn graph theo

2016-09-11 11:54:41 595

原创 HDU 4445 Running Rabbits(模拟)

Running RabbitsTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1792    Accepted Submission(s): 1257Problem DescriptionRabbit Tom

2016-08-19 00:21:23 650

原创 HDU 4451 Dressing(计数)

DressingTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3807    Accepted Submission(s): 1722Problem DescriptionWangpeng has N cl

2016-08-18 21:20:50 443

原创 HDU 1421 搬寝室(DP)

搬寝室Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25567    Accepted Submission(s): 8783Problem Description搬寝室是很累的,xhd深有体会.时间追述2

2016-08-16 15:58:29 317

原创 HDU 2089 不要62(数位DP)

不要62Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 31495    Accepted Submission(s): 11146Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音

2016-08-14 11:56:54 326

原创 Codeforces Round #367 (Div. 2)

A. Beru-taxitime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasiliy lives at point (a, b) of the coordinate plane. He

2016-08-12 10:16:50 373

原创 HDU 3234 Exclusive-OR(加权并差集)

Exclusive-ORTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3300    Accepted Submission(s): 909Problem DescriptionYou are not gi

2016-08-11 22:31:03 692

原创 HDU 3236 Gift Hunting(0-1背包变异)

Gift HuntingTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1743    Accepted Submission(s): 581Problem DescriptionAfter winning

2016-08-11 22:26:14 413

原创 CSU 1116: Kingdoms(状态压缩+DP)

KingdomsTime Limit: 3 Sec  Memory Limit:64 MBSubmit: 410  Solved: 127[Submit][Status][Web Board]DescriptionA kingdom has n cities numbered 1 to n, and some bidirectional roads connecti

2016-08-09 01:22:28 533 1

原创 数列上的分治(求逆序数)

在网上看,逆序数可以有线段树解决,我不太清楚,不过最近我在学习如何用分治处理逆序数问题。大家看看代码吧,看完估计就懂了(如果还不懂去看下分治排序,逆序数问题是在其基础之上的)#include#include#include#include#include#includeusing namespace std;vector A;int merge_count(vect

2016-08-07 17:52:38 618 7

原创 POJ Evil Straw Warts Live (贪心)

Evil Straw Warts LiveTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 850Accepted: 239DescriptionA palindrome is a string of symbols that is equal to

2016-08-07 17:48:34 509 4

原创 POJ 3258 River Hopscotch(二分·最小距离最大)

River HopscotchTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 11580Accepted: 4985DescriptionEvery year the cows hold an event featuring a peculiar v

2016-08-04 16:43:22 480

原创 POJ 25456 Aggressive cows 【二分最大化最小值】

Aggressive cowsTime Limit:1000MS    Memory Limit:65536KB    64bit IO Format:%lld & %lluSubmitStatusDescriptionFarmer John has built a new long barn, with N (2 <= N <= 100,000) stalls.

2016-08-04 14:37:31 543

原创 HDU 5532 Almost Sorted Array(状态压缩DP)

Almost Sorted ArrayTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2526    Accepted Submission(s): 627Problem DescriptionWe ar

2016-08-03 20:50:38 425

原创 POJ 2441 Arrange the Bulls(状态压缩DP入门)

- Arrange the BullsTime Limit:4000MS    Memory Limit:65536KB    64bit IO Format:%lld & %lluSubmitStatusDescriptionFarmer Johnson's Bulls love playing basketball very much. But none of

2016-08-02 17:39:18 487

原创 HDU 1712 ACboy needs your help (简单分组背包)

ACboy needs your helpTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6242    Accepted Submission(s): 3427Problem DescriptionACbo

2016-08-02 11:29:18 382

原创 HDU 3339 In Action (dijkskra+01背包)

New~ 欢迎参加2016多校联合训练的同学们~In ActionTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5342    Accepted Submission(s): 1794Problem Des

2016-08-02 11:22:48 407

原创 HDU 5763 Another Meaning (DP)

Another MeaningTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1130    Accepted Submission(s): 531Problem DescriptionAs is known

2016-08-02 11:07:59 351

原创 HDU 5532 Almost Sorted Array (dp)

Almost Sorted ArrayTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2508    Accepted Submission(s): 619Problem DescriptionWe ar

2016-08-02 11:04:21 476

原创 HDU 3664 Permutation Counting (DP)

Permutation CountingTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1593    Accepted Submission(s): 821Problem DescriptionGiven

2016-08-02 10:53:16 353

原创 HDU 5418 Victor and World(状压dp、floy最短路)

Victor and WorldTime Limit:2000MS    Memory Limit:131072KB    64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 5418DescriptionAfter trying hard for many years, Victor has finally rec

2016-07-31 11:55:49 573

原创 Codeforces 543A. Writing Code DP

Writing CodeTime Limit:3000MS    Memory Limit:262144KB    64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 543ADescriptionProgrammers working on a large project have just received a task to

2016-07-31 11:47:54 552

空空如也

空空如也

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

TA关注的人

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