码迷,mamicode.com
首页 >  
搜索关键字:amp    ( 86777个结果
测试赛A - Colored Sticks(并查集+字典树+欧拉回路)
A - Colored Sticks Time Limit:5000MS     Memory Limit:128000KB     64bit IO Format:%I64d & %I64u Submit Status Description You are given a bunch of wooden sticks. Each endpoint of each...
分类:其他好文   时间:2014-07-30 17:45:54    阅读次数:246
测试赛B - Balance(天平的dp问题)
B - Balance Time Limit:1000MS     Memory Limit:30000KB     64bit IO Format:%I64d & %I64u Submit Status Description Gigel has a strange "balance" and he wants to poise it. Actually, t...
分类:其他好文   时间:2014-07-30 17:45:24    阅读次数:271
测试赛D - The War(有控制范围的贪心)
#include #include #include using namespace std; struct node{ int x , y ; } p[2600]; int q[1200] ; bool cmp(node a,node b) { return a.y < b.y || ( a.y == b.y && a.x < b.x ) ; } int main() {...
分类:其他好文   时间:2014-07-30 17:44:44    阅读次数:219
POJ 2029 DP || 暴力
在大矩形中找一个小矩形 使小矩形包含的*最多 暴力或者DP  水题 暴力: #include "stdio.h" #include "string.h" int main() { int n,m,w,i,s,t,j,k,l,ans,sum,x,y; int map[101][101]; while (scanf("%d",&w)!=EOF) ...
分类:其他好文   时间:2014-07-30 17:44:24    阅读次数:201
测试赛F - Dragon Balls(并查集)
F - Dragon Balls Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Description Five hundred years later, the number of dragon balls will increa...
分类:其他好文   时间:2014-07-30 17:44:23    阅读次数:282
测试赛C - Eqs(哈希)
C - Eqs Time Limit:5000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Description Consider equations having the following form:  a1x1 3+ a2x2 3+ a3x3 3+ a...
分类:其他好文   时间:2014-07-30 17:34:13    阅读次数:173
CodeForces 52B Right Triangles 矩阵上的计数
题目链接:点击打开链接 题意: 问有多少个与矩阵边平行的直角三角形,且三角形的3个顶点都是* 对于 L形 或者_| 形的三角形,我们只需要知道在_ 上方有多少个*即可,下底边则任取2个 所以用l[i]表示 第i列的*的个数 然后扫完一行,再把这行的*更新到 l[] 里 从上到下扫一遍得到所有 L _| 的三角形 再从下到上扫一遍 得到 ~| 和 |~ 的。。 #in...
分类:其他好文   时间:2014-07-30 17:30:54    阅读次数:173
从尾到头打印链表
使用数据结构stack或者递归 1 使用stack #include #include using namespace std; typedef struct listNode{ int key; struct listNode *pNext; } * pNode,Node; void createNode(pNode &pHead){ bool isFirst=true;...
分类:其他好文   时间:2014-07-30 17:30:34    阅读次数:189
poj2112 Optimal Milking --- 最大流,二分
nx个挤奶器,ny头奶牛,每个挤奶器最多能供m头奶牛使用。 现给出nx+ny之间的距离矩阵,求使得全部奶牛都到某个挤奶器挤奶所走的路程中,单个奶牛所走的最大路程的最小值。 开始感觉这个类似二分图匹配,不同之处在于挤奶器可以连接m个以内的奶牛,用网络流的模型是可以求出满足条件的解的。 问题是如何满足最大路程的最小值,这一种典型的二分的问法。。 所以我们二分答案,也就是枚举最大路程...
分类:其他好文   时间:2014-07-30 17:29:24    阅读次数:200
HDU 1114 Piggy-Bank 完全背包
Piggy-Bank Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Description Before ACM can do anything, a budget must be prepared and the necessar...
分类:其他好文   时间:2014-07-30 17:26:54    阅读次数:202
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!