自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(61)
  • 资源 (1)
  • 收藏
  • 关注

原创 乘法逆元的快捷求法

不说了,上代码int[] inv = new int[MAXN]; inv[1] = 1; for (int i = 2; i<MAXN; i++) inv[i] = inv[MOD%i]*(MOD-MOD/i)%MOD;

2015-03-07 22:36:33 473

原创 hdu 4791 RMQ

我是来存RMQ板的#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #incl

2014-10-09 20:09:43 631

原创 leetcode Wildcard Matching

Wildcard Matching Total Accepted: 14208 Total Submissions: 100593My SubmissionsImplement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Ma

2014-10-08 21:30:50 658

原创 leetcode Sudoku Solver

Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will be only one unique solution.A sudoku puzzle.

2014-10-08 12:18:37 534

原创 codeforces 271E 离散化+线段树,dp优化

E. Pillarstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMarmot found a row with n pillars. The i-th pilla

2014-10-07 18:50:14 701

原创 codeforces 474F 区间gcd + 离散化

F. Ant colonytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMole is hungry again. He found one ant colony, consistin

2014-10-07 15:50:19 1192

原创 acdream contest 1131 Burning Bridges

http://acdream.info/contest?cid=1131#overview

2014-10-07 13:39:48 634

原创 hdu 5060 求球与圆柱相交体积

这是个纯数学题,考的是积分

2014-10-06 19:47:42 2907

原创 hihocoder 1041

时间限制:1000ms单点时限:1000ms内存限制:256MB描述小Hi和小Ho准备国庆期间去A国旅游。A国的城际交通比较有特色:它共有n座城市(编号1-n);城市之间恰好有n-1条公路相连,形成一个树形公路网。小Hi计划从A国首都(1号城市)出发,自驾遍历所有城市,并且经过每一条公路恰好两次——来回各一次——这样公路两旁的景色都不会错过。令小

2014-10-03 07:15:13 2001

原创 hdu 3549 网络流模板(dinic + ISAP)

就是用来检测模板的dinic:

2014-10-03 00:43:53 739

原创 poj 1741

还是树分治,听说这题挺经典就拿来zuo

2014-10-02 01:40:08 603

原创 hdu 4812 树分治

这种题目很不擅长,接下来要多加训练

2014-10-01 21:37:03 733

原创 hdu 4804 简单插头

去年南京赛区的题目,当时还没学过cha

2014-10-01 16:16:40 724

原创 hdu 2295 DLX重复覆盖

#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include

2014-09-30 22:37:47 565

原创 DLX模板

DLX 精确覆盖 hust 1017题意:给你一个01矩阵,找出选择哪些行能使每列有且仅有一个1

2014-09-30 19:11:21 604

原创 判断二分图

就是简单的判断二分图,存下

2014-09-05 19:24:52 624

原创 codeforces 458C Elections

C. Electionstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are running for a governor in a small city

2014-08-13 22:43:10 1247

转载 矩阵乘法优化

转自:http://blog.csdn.net/gogdizzy/article/details/9003369题目地址:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1113昨晚为了优化这个题目弄到2点多,今天一早就写博,我真是太不蛋定了,哈哈。做OJ的朋友都知道快速幂,我就不罗嗦了

2014-08-13 18:19:37 968

原创 hdu 4944

题意:for(int i=1;i             for(int j = 1;j                  for(int k = 1;k                       if(i % k == 0 && j % k == 0) ans += i * j / gcd(i, j);易得dp[i] = dp[i-1] + num[i] * i;关

2014-08-13 16:30:40 707

原创 hdu 4928 Series 2

Series 2Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 499    Accepted Submission(s): 110Problem DescriptionLet A be an integ

2014-08-10 16:16:03 860

原创 codeforces 455C Civilization

C. Civilizationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrew plays a game called "Civilization". D

2014-08-09 17:12:24 702

原创 codeforces 455B. A Lot of Games

B. A Lot of Gamestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrew, Fedor and Alex are inventive guys.

2014-08-09 15:14:34 675

原创 hdu 4916 Count on the path

Count on the pathTime Limit: 5000/2500 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 378    Accepted Submission(s): 113Problem Descriptionbobo has

2014-08-08 22:26:12 759

原创 hdu 4921 Map

MapTime Limit: 3000/1500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 235    Accepted Submission(s): 74Problem DescriptionThere are N pieces of f

2014-08-08 16:10:05 698

原创 hdu 4923 Room and Moor

Room and MoorTime Limit: 12000/6000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 675    Accepted Submission(s): 197Problem DescriptionPM Room def

2014-08-08 14:07:56 500

转载 hdu 4609 3-idiots (FFT)

学会了FFT。这题就很容易了。其实题目是给了n条线段。问随机取三个,可以组成三角形的概率。 其实就是要求n条线段,选3条组成三角形的选法有多少种。 首先题目给了a数组,如样例一:41 3 3 4把这个数组转化成num数组,num[i]表示长度为i的有num[i]条。样例一就是num = {0   1  

2014-08-06 23:13:18 616

原创 hdu 1402 FFT

就是求两个长度为50000的数相乘。第一次用了FFTl

2014-08-06 22:14:52 575

原创 hdu 4912 Paths on the tree

Paths on the treeTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 365    Accepted Submission(s): 111Problem Descriptionbobo has

2014-08-06 15:26:32 640

原创 hdu 4911 Inversion 树状数组求逆序数对

InversionTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 389    Accepted Submission(s): 159Problem Descriptionbobo has a seque

2014-08-05 22:05:27 674

原创 hdu 4919 Exclusive or + 高精度板

Exclusive orTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 100    Accepted Submission(s): 41Problem DescriptionGiven n, find

2014-08-05 19:42:48 791

原创 hdu 4915 Parenthese sequence

Parenthese sequenceTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 85    Accepted Submission(s): 28Problem Descriptionbobo fou

2014-08-05 19:09:50 660

原创 poj 2135 Farm Tour + 费用流vector模板

Farm TourTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11260 Accepted: 4174DescriptionWhen FJ's friends visit him on the farm, he likes to show th

2014-08-04 21:33:21 597

原创 hdu 4910 Problem about GCD

Problem about GCDTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 341    Accepted Submission(s): 52Problem DescriptionGiven integ

2014-08-04 17:58:30 658

原创 hdu 4876 ZCC loves cards

ZCC loves cardsTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1929    Accepted Submission(s): 503Problem DescriptionZCC loves p

2014-08-03 15:48:47 997

原创 hdu 4906 Our happy ending

Our happy endingTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 700    Accepted Submission(s): 223Problem DescriptionThere is

2014-08-03 14:16:56 645

原创 acdream 1171 Matrix sum

H - Matrix sumTime Limit: 8000/4000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)SubmitStatusProblem Descriptionsweet和zero在玩矩阵游戏,sweet画了一个N * M的矩阵,矩阵的每个格子有一个整数。zero给出N个数Ki

2014-08-02 18:26:08 564

原创 codeforces 453B Little Pony and Harmony Chest

B. Little Pony and Harmony Chesttime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPrincess Twilight went to

2014-08-02 14:47:17 607

原创 hdu 4888 Redraw Beautiful Drawings

Redraw Beautiful DrawingsTime Limit: 3000/1500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1213    Accepted Submission(s): 243Problem DescriptionA

2014-07-30 16:21:54 526

原创 hdu 4889 Scary Path Finding Algorithm

Scary Path Finding AlgorithmTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 130    Accepted Submission(s): 47Special JudgeProblem De

2014-07-29 21:44:06 791

原创 hdu 4893 Wow! Such Sequence!

Wow! Such Sequence!Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 315    Accepted Submission(s): 95Problem DescriptionRecently

2014-07-29 21:41:04 570

C++堆排序,包括建堆,上调,下调,排序,树形输出

堆排序,包括树形输出,建堆,下调,上调等

2012-12-12

空空如也

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

TA关注的人

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