自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 收藏
  • 关注

原创 HDU 4734 F(x) 数位dp

F(x)Time Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6341 Accepted Submission(s): 2438Problem DescriptionFor a decimal number x with n digits (AnAn-1An-2 ... A2A1), we define its weight as F(x)

2017-08-31 21:07:51 798

原创 数位dp练习(记忆化搜索)HDU 2089 不要62

不要62Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 45764 Accepted Submission(s): 17240Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可

2017-08-30 21:15:43 862

原创 2017ICPC北方邀请赛H题 MJF wants to work(贪心)

4203: MJF wants to work时间限制: 1 Sec 内存限制: 128 MB提交: 60 解决: 11[提交][状态][讨论版]题目描述MJF feel the summer vacation is very leisure. So he wants to work to earn money. There are n jobs MJF can take part in.For job i, it has the start time ti.x, the end time

2017-08-29 19:48:11 1144

原创 2017广西邀请赛CS Course(&|^位运算模拟)

4334: CS Course时间限制: 2 Sec 内存限制: 512 MB提交: 37 解决: 13[提交][状态][讨论版]题目描述Little A has come to college and majored in Computer and Science.Today he has learned bit-operations in Algorithm Lessons, and he got a problem as homework.Here is the problem:

2017-08-28 20:37:27 1675

原创 HDU1532 Drainage Ditches 网络流--dinic算法 SAP算法

HDU1532:http://acm.hdu.edu.cn/showproblem.php?pid=1532Drainage DitchesTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19000    Accepted Submissi...

2017-08-26 16:49:03 824

原创 Codeforces 785D - Anton and School - 2(范德蒙恒等式+逆元)

D. Anton and School - 2time limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputAs you probably know, Anton goes to school. One of the school subjects that Anton studies is Bracketology. On the Bracketo

2017-08-25 21:10:54 930

原创 HDU1532 Drainage Ditches 网络流之SAP算法

HDU1532:http://acm.hdu.edu.cn/showproblem.php?pid=1532Drainage DitchesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 19000 Accepted Submission(s): 9058Problem DescriptionEvery time it rain

2017-08-25 21:03:40 729

原创 poj3281 Dining 网络流匹配问题(拆点建图+Edmond-Karp算法)

DiningTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 19183 Accepted: 8556DescriptionCows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others.Farmer John has cooked fabulous mea

2017-08-23 17:59:11 1188

原创 poj2947 Widget Factory (高斯消元解模线性方程组)

Widget FactoryTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 6261 Accepted: 2207DescriptionThe widget factory produces several different kinds of widgets. Each widget is carefully built by a skilled widgeteer. The time required to build a

2017-08-23 10:48:33 716

原创 codeforces Masha and geometric depression(set模拟,等比数列)

B. Masha and geometric depressiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMasha really loves algebra. On the last lesson, her strict teacher Dvastan gave she new exercise.You are given geom

2017-08-21 21:25:58 636

原创 275. To xor or not to xor(高斯消元求最大亦或值)

275. To xor or not to xortime limit per test: 0.25 sec.memory limit per test: 65536 KBinput: standardoutput: standardThe sequence of non-negative integers A1, A2, ..., AN is given. You are to find some subsequence Ai1, Ai2, ..., Aik (1 <= i1 < i2

2017-08-18 11:32:23 853

原创 拓扑排序例题 hdu1285 hdu3342

HDU1285 确定比赛名次Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 28138 Accepted Submission(s): 11215Problem Description有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员

2017-08-16 21:33:50 1299

原创 ACM高斯消元法 亦或方程组求秩 (HDU5833 Zhu and 772002)

#include <stdio.h> #include <string.h> #include <iostream> #include <algorithm> #define set(a,i) memset(a,i,sizeof(a)) using namespace std; typedef long long ll; const int mod=1e9+7; ll qpow(ll n,ll m){n%=mod;ll ans=1;while(m){if(m%2)

2017-08-16 21:20:04 1925

原创 树状数组的应用(区间修改+区间查询)

树状数组之————区间修改+区间查询树状数组的工作是 对一组数据进行快速修改查询操作最基本的功能是 单点修改+区间查询。然后厉害的是 区间修改+单点查询(用数组del[i]表示原数组a[i]-a[i-1]的值)更厉害的来了。。。区间修改+区间查询用数组del[i]记录原数组a[i]与前一项和,即del[i]=a[i]-a[i-1]

2017-08-13 21:07:05 679

原创 最长递增子序列-动态规划dp-51node

给出长度为N的数组,找出这个数组的最长递增子序列。(递增子序列是指,子序列的元素是递增的)例如:5 1 6 8 2 4 5 10,最长递增子序列是1 2 4 5 10。输入第1行:1个数N,N为序列的长度(2 <= N <= 50000)第2 - N + 1行:每行1个数,对应序列的元素(-10^9 <= S[i] <= 10^9)输出输出最长递增子序列的长度。

2017-08-11 10:05:02 659

原创 HDU 5542 The Battle of Chibi(树状数组+dp)

The Battle of ChibiTime Limit: 6000/4000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 1749 Accepted Submission(s): 621Problem DescriptionCao Cao made up a big army and was going to invade the whole South China.

2017-08-10 19:24:49 779

原创 2017百度之星资格赛题解(1003、1004)

1003度度熊与邪恶大魔王Accepts: 1503Submissions: 9026Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description度度熊为了拯救可爱的公主,于是与邪恶大魔王战斗起来。邪恶大魔王的麾下有n个怪兽,每个怪兽有...

2017-08-05 17:49:00 5007 1

转载 树状数组的应用(区间修改,区间查询,多维树状数组)

14、树状数组(1)、单点增减+区间求和思路:C[x]表示该点的元素:sum(x)=C[1]+C[2]+……C[x][cpp] view plain copy print?int arr[MAXN]; inline int sum(int x){int res=0;while(x)res+=arr[x],x-=lowbit(x);return res;} 15、多维树状数组①单点增减(add) + 矩形求和(query) ②矩形增减(update) + 单点求值(sum)inline

2017-08-03 09:32:03 400

原创 ACM暑假训练codeforces A. Arcade Game D. Frozen Rivers(康托展开式,spfa)

A. Arcade Gametime limit per test1.0 smemory limit per test1024 MBinputstandard inputoutputstandard outputArcade mall is a new modern mall. It has a new hammer game called "Arcade Game". In this game you're presented with a number nwhich is hanged on

2017-08-02 17:18:52 576

原创 ACM暑假训练 中石油oj 3737: 礼物(矩阵快速幂)

矩阵快速幂解决递推题3737: 礼物时间限制: 5 Sec 内存限制:512 MB提交: 46 解决: 12[提交][状态][讨论版]题目描述热情好客的小猴请森林中的朋友们吃饭,他的朋友被编号为 1∼N,每个到来的朋友都会带给他一些礼物:香蕉。其中,第一个朋友会带给他1个香蕉,之后,每一个朋友到来以后,都会带给他之前所有人带来的礼物个数再加他的编号的K次方那么多个。所以,假设 K=2,前几位朋友带来的礼物个数分别是:1,5,15,37,83,…假设 K=3,前几位朋友带来的礼物个数

2017-08-02 10:59:46 745

空空如也

空空如也

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

TA关注的人

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