关闭
当前搜索:

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): 2438 Problem Description For a decimal number x with n digits (AnAn-1An-2 ... A2A1), we define its weight as F(x)...
阅读(421) 评论(0)

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

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

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...
阅读(827) 评论(0)

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: ...
阅读(1142) 评论(0)

HDU1532 Drainage Ditches 网络流之dinic算法(省内存,但耗时)

Drainage Ditches Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 19000 Accepted Submission(s): 9058 Problem Description Every time it rains on Farmer John's fields, a pond forms over Bessie's fa...
阅读(489) 评论(0)

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

D. Anton and School - 2 time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output As you probably know, Anton goes to school. One of the school subjects that Anton studies is Bracketology. On the Bracketo...
阅读(604) 评论(0)

HDU1532 Drainage Ditches 网络流之SAP算法

HDU1532:http://acm.hdu.edu.cn/showproblem.php?pid=1532 Drainage Ditches Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 19000 Accepted Submission(s): 9058 Problem Description Every time it rain...
阅读(445) 评论(0)

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

Dining Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 19183 Accepted: 8556 Description Cows 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...
阅读(842) 评论(0)

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

Widget Factory Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 6261 Accepted: 2207 Description The widget factory produces several different kinds of widgets. Each widget is carefully built by a skilled widgeteer. The time required to build a...
阅读(449) 评论(0)

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

B. Masha and geometric depression time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Masha really loves algebra. On the last lesson, her strict teacher Dvastan gave she new exercise. You are given geom...
阅读(390) 评论(0)

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

275. To xor or not to xor time limit per test: 0.25 sec. memory limit per test: 65536 KB input: standard output: standard The sequence of non-negative integers A1, A2, ..., AN is given. You are to find some subsequence Ai1, Ai2, ..., Aik (1 <= i1 < i2 ...
阅读(439) 评论(0)

拓扑排序例题 hdu1285 hdu3342

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

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

#include #include #include #include #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)...
阅读(780) 评论(0)

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

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

最长递增子序列-动态规划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) 输出 输出最长递增子序列的长度。...
阅读(301) 评论(0)

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

The Battle of Chibi Time Limit: 6000/4000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 1749 Accepted Submission(s): 621 Problem Description Cao Cao made up a big army and was going to invade the whole South China....
阅读(486) 评论(0)

2017百度之星资格赛题解

1003度度熊与邪恶大魔王 Accepts: 1503 Submissions: 9026 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 度度熊为了拯救可爱的公主,于是与邪恶大魔王战斗起来。 邪恶大魔王的麾下有n个怪兽,每个怪兽有a[i]的生命值,以及b[i]的防御力。 度度熊一共拥有m种攻击方式,第i种攻击方式,需要消耗k[i]的晶石,造成p[i]点...
阅读(2330) 评论(0)

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

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...
阅读(192) 评论(0)

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

A. Arcade Game time limit per test1.0 s memory limit per test1024 MB inputstandard input outputstandard output Arcade 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 ...
阅读(246) 评论(0)

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

矩阵快速幂解决递推题 3737: 礼物 时间限制: 5 Sec 内存限制:512 MB 提交: 46 解决: 12 [提交][状态][讨论版] 题目描述 热情好客的小猴请森林中的朋友们吃饭,他的朋友被编号为 1∼N,每个到来的朋友都会带给他一些礼物:香蕉。其中,第一个朋友会带给他1个香蕉,之后,每一个朋友到来以后,都会带给他之前所有人带来的礼物个数再加他的编号的K次方那么多个。所以,假设 K=2,前几位朋友带来的礼物个数分别是: 1,5,15,37,83,… 假设 K=3,前几位朋友带来的礼物个数...
阅读(344) 评论(0)
    个人资料
    • 访问:103698次
    • 积分:3019
    • 等级:
    • 排名:第13770名
    • 原创:197篇
    • 转载:9篇
    • 译文:0篇
    • 评论:33条
    博客专栏
    最新评论