比赛&模板
ACBOY、
这个作者很懒,什么都没留下…
展开
-
2013年ACM网络赛成都赛区
点击打开链接We Love MOE GirlsTime Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 282 Accepted Submission(s): 207Problem DescriptionChika原创 2013-09-16 08:44:15 · 2205 阅读 · 0 评论 -
Codeforces Round #257 (Div. 2)
A. Jzzhu and Childrentime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n children in Jzzhu's school原创 2014-07-22 11:22:28 · 1344 阅读 · 0 评论 -
Codeforces Round #237 (Div. 2)
点击打开链接A. Valera and Xtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputValera is a little boy. Yesterda原创 2014-03-20 20:54:43 · 1358 阅读 · 0 评论 -
Codeforces Round #253 (Div. 2)
A. Anton and Letterstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently, Anton has found a set. The s原创 2014-06-21 18:10:34 · 1415 阅读 · 0 评论 -
Codeforces Round #251 (Div. 2)
A. Devu, the Singer and Churu, the Jokertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDevu is a renowned原创 2014-06-07 16:31:17 · 1428 阅读 · 0 评论 -
Codeforces Round #236 (Div. 2)
点击打开链接A. Nutstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have a nuts and lots of boxes. T原创 2014-03-19 11:05:31 · 946 阅读 · 0 评论 -
Codeforces Round #239 (Div. 2)
点击打开链接A. Line to Cashiertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Vasya went to the supe原创 2014-03-30 19:19:24 · 1315 阅读 · 0 评论 -
Codeforces Round #238 (Div. 2)
点击打开链接A. Gravity Fliptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Chris is bored during his原创 2014-03-23 12:18:04 · 1082 阅读 · 0 评论 -
线段树模板
#include#include#include#define ll __int64#define M 100007using namespace std;struct node{ ll l,r,mid,val,mark;}tree[M<<2];ll s[M];void build(ll left,ll right,ll i)//建树{ tree[i].l=l原创 2015-02-05 18:11:03 · 999 阅读 · 0 评论 -
最大流(SAP)及最小费用最大流(SPFA)模版
最小费用最大流 模版一、最小费用最大流的模型在保证流量最大的前提下,所需的费用最小,这就是最小费用最大流问题. 带有费用的网络流图: G=(V,E,C,W)V:顶点; E:弧;C:弧的容量;W:单位流量费用。任意的弧对应非负的容量c[i,j]和单位流量费用w[i,j]。满足:① 流量f是G的最大流。② 在f是G的最大流的前提下,流的费用最小。原创 2013-07-28 16:38:57 · 3691 阅读 · 0 评论 -
树的最小支配集&&最小点覆盖&&最大独立集模板
/*覆盖i,要么是父节点覆盖,要么是自己,要么是孩子,所以三种状态(和上面的对应): 1、点i自己覆盖自己,i的所有孩子都覆盖,用dp[i][0]表示; 2、点i被自己的孩子覆盖,i和i的所有孩子都覆盖,用dp[i][1]表示; 3、点i被父节点覆盖,i的所有孩子都覆盖,用dp[i原创 2013-10-18 15:14:49 · 1524 阅读 · 0 评论 -
字典树模板
#include#include#include#define MAX 26//Trie的数据结构定义typedef struct Trie { Trie *next[MAX]; int v; //根据需要变化}; Trie *root;//生成字典树void createTrie(char *str){ int l转载 2013-08-16 12:13:34 · 993 阅读 · 0 评论 -
最小树形图模板(朱刘算法)
点的标号必须是0到n-1必须去除到自身的边,到自身的边的权为无穷大#include#include#include#define M 1007#define inf 0x3f3f3fusing namespace std;int pre[M],vis[M],id[M];int in[M];int n,m;struct Node//建立邻接表{ int u,原创 2013-10-11 16:13:35 · 1615 阅读 · 0 评论 -
tarjan缩点建图以及双联通求割点,桥模版
#include #include #include #include #include #include #include #include #include #include #include #include using namespace std;const int INF = 0x3f3f3f3f;/** 求 无向图的割点和桥原创 2013-09-16 21:26:50 · 1639 阅读 · 0 评论 -
无向图最小生成树、次小生成树,最短路模板
最小生成树有两种模板,都比较简单。prime算法:#include#include#define MAX 99999999int g[110][110];int n;int prim(){ int low[110]; int flag[110]; memset(flag,0,sizeof(flag)); for(int i=1; i<=n原创 2013-09-27 22:10:08 · 1471 阅读 · 0 评论 -
Codeforces Round #235 (Div. 2)
点击打开链接A. Vanya and Cardstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVanya loves playing. He even原创 2014-03-11 19:49:47 · 906 阅读 · 0 评论 -
codeforces 453A Little Pony and Expected Maximum 最大值期望
点击打开链接A. Little Pony and Expected Maximumtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTw原创 2014-08-04 20:18:17 · 1465 阅读 · 0 评论 -
Codeforces Round #252 (Div. 2)
A. Valera and Antique Itemstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputValera is a collector. Once he w原创 2014-06-09 19:30:45 · 1269 阅读 · 0 评论 -
2013年ACM网络赛杭州赛区
点击打开链接 The Donkey of Gui ZhouTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 309 Accepted Submission(s): 119Problem Descripti原创 2013-09-16 08:27:05 · 1740 阅读 · 0 评论 -
第五届山东理工大学ACM网络编程擂台赛
点击打开链接公共因子Time Limit: 1000MS Memory limit: 65536K题目描述 假设字符串也有因数,一个字符串为s1,然后可以由n个字符串s2来表示,则称s2是s1的因数。 如“ac”是“acac”的因数。 给两个字符串,求它们的公因数有多少个。 输入 多组数据,给原创 2013-11-02 13:50:32 · 3950 阅读 · 1 评论 -
2013年山东省第四届ACM大学生程序设计竞赛
Rescue The Princess Time Limit: 1000MS Memory limit: 65536K 题目描述 Several days ago, a beast caught a beautiful princess and the princess was put in prison. To rescue the princess, a p原创 2013-06-20 19:25:27 · 2667 阅读 · 0 评论 -
2013年ACM网络赛长春赛区
点击打开链接Cut the CakeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 294 Accepted Submission(s): 129Problem DescriptionM原创 2013-09-29 16:57:20 · 1901 阅读 · 0 评论 -
辽宁省赛2010
Dinner时间限制: 1000 ms 内存限制: 32768 K问题描述Little A is one member of ACM team. He had just won the gold in World Final. To celebrate, he decided to invite all to have one meal. As bowl, knife an原创 2014-02-13 22:52:02 · 2381 阅读 · 0 评论 -
HDU 2007'10 Programming Contest_WarmUp
点击打开链接Secret NumberTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7398 Accepted Submission(s): 3138Problem Description原创 2014-03-07 13:25:49 · 1779 阅读 · 0 评论 -
CodingTrip - 携程编程大赛 (预赛第一场)
聪明的猴子Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1123 Accepted Submission(s): 294Problem Description森林中有一排香蕉树(无限长),一只猴子站在原创 2014-04-11 19:54:00 · 1816 阅读 · 0 评论 -
2014 ACM-ICPC Beijing Invitational Programming Contest
点击打开链接Happy ReversalTime Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name: MainPrev Submit Status Statistics Discuss NextFont Size: +原创 2014-06-28 19:16:53 · 1029 阅读 · 0 评论 -
BestCoder Round #1
逃生Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 569 Accepted Submission(s): 154Problem Description糟糕的事情发生啦,现在大家都忙着逃命。但是逃命的通原创 2014-07-22 09:27:22 · 1069 阅读 · 0 评论 -
2014 Multi-University Training Contest 1
Couple doubiTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 674 Accepted Submission(s): 483Problem DescriptionDouBiXp has a g原创 2014-07-24 18:37:10 · 984 阅读 · 0 评论 -
BestCoder Round #2
TIANKENG’s restaurantTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 600 Accepted Submission(s): 280Problem DescriptionTIANK原创 2014-07-30 11:11:57 · 1072 阅读 · 0 评论 -
Codeforces Round #FF (Div. 2)
A. DZY Loves Hashtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDZY has a hash table with p buckets, numbe原创 2014-07-14 22:26:10 · 919 阅读 · 0 评论 -
山东省第三届ACM大学生程序设计竞赛(待添加)
n a^o7 !Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^题目描述All brave and intelligent fighters, next you will step into a distinctive battleground which is full of sweet and happine原创 2013-12-08 14:59:02 · 1456 阅读 · 0 评论 -
Codeforces Round #285 C. Misha and Forest
点击打开链接C. Misha and Foresttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's define a forest as原创 2015-01-13 10:40:56 · 1261 阅读 · 0 评论 -
二分匹配求最大匹配数和最大匹配值
求最大匹配数,匈牙利算法:#include#includeusing namespace std;int n;int link[1007],g[1007][1007];bool vis[1007];bool find(int i){ for(int j=1;j<=n;j++) if(g[i][j]&&!vis[j]) { vis[j]=tr原创 2013-09-27 15:05:59 · 1373 阅读 · 0 评论