自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

看曙光

就在前面

  • 博客(8)
  • 资源 (4)
  • 收藏
  • 关注

原创 Codeforces Round #216 (Div. 2)

A.分别记录两种食物的数量,先统计第一种洗盘数,后统计第二种洗餐具数。#include#include#include#include#include#include#include#include#include#include#include#define PI acos(-1.0)#define maxn 160#define INF

2013-11-30 12:25:07 1010

原创 手写邻接表

手写实现邻接表,对图或树的边操作速度最快化。

2013-11-30 01:36:43 1428 2

原创 UVa 11181 Probability|Given

Problem GProbability|GivenInput: Standard InputOutput: Standard Output N friends go to the local super market together. The probability of their buying something from the market is respectiv

2013-11-29 09:32:49 983

原创 UVa 10047 The Monocycle

The MonocycleA monocycle is a cycle that runs on one wheel and the one we will be considering is a bit more special. It has a solid wheel colored with five different colors as shown in the f

2013-11-29 08:10:14 889

原创 Timus 1057 数位dp

1057. Amount of DegreesTime limit: 1.0 secondMemory limit: 64 MBCreate a code to determine the amount of integers, lying in the set [X;Y] and being a sum of exactlyK different integer de

2013-11-28 13:14:07 802

原创 hdu 1506 Largest Rectangle in a Histogram

Largest Rectangle in a Histogramdp。思路:分别用两个数组记录对应的每个矩形左侧和右侧高度大于等于它本身的矩形的数量,这样用(高度*(左侧数量+右侧数量+1))即可表示对应高度的最大矩形面积。100000的数据量用O(n2)的暴力肯定会T,分别从左到右更新左侧数量和从右到左更新右侧数量。刚开始用long long 一直wa,后来改成__int64就过了。

2013-11-21 13:32:58 882

原创 hdu 3037 Saving Beans

lucas原理加乘法逆元。1.卢卡斯原理。设为质数,,且,,其中都是整数,。。 2.乘法逆元求(a/b)%c,但a又特别大,就要求乘法逆元k,使(a*k)%c与(a/b)%c等价。满足a*k≡1(modc)的k值就是a关于c的乘法逆元。证明略过,可以用欧几里得扩展算法或欧拉定理求得。欧拉定理表明,若

2013-11-20 02:13:02 914

原创 HDU 1864 最大报销额

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1864刚开始题意理解错了,没看明白题里单项物品是什么意思,还脑抽的用dfs写了一下,结果T掉了。其实就是01背包问题。英语题读错尚且能找理由,汉语题读错就太逗了。浮点型保留两位小数直接把数据乘100就能处理了。#include#include#include#include#incl

2013-11-18 11:07:48 657

commons-httpclient-3.0.1.jar

commons-httpclient-3.0.1.包,旧版httpclient(新版的语法有所改变)

2015-02-14

commons-codec-1.4.jar

commons-codec-1.4包,实现HttpClient必备

2015-02-14

手写邻接表

模拟指针链表的写法,操作速度比map 要快很多,而且写起来很好看。不理解的话,用手在纸上写写画画就明白了。

2014-12-21

空空如也

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

TA关注的人

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