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
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
#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
在大矩形中找一个小矩形
使小矩形包含的*最多
暴力或者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
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
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
题目链接:点击打开链接
题意:
问有多少个与矩阵边平行的直角三角形,且三角形的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
nx个挤奶器,ny头奶牛,每个挤奶器最多能供m头奶牛使用。
现给出nx+ny之间的距离矩阵,求使得全部奶牛都到某个挤奶器挤奶所走的路程中,单个奶牛所走的最大路程的最小值。
开始感觉这个类似二分图匹配,不同之处在于挤奶器可以连接m个以内的奶牛,用网络流的模型是可以求出满足条件的解的。
问题是如何满足最大路程的最小值,这一种典型的二分的问法。。
所以我们二分答案,也就是枚举最大路程...
分类:
其他好文 时间:
2014-07-30 17:29:24
阅读次数:
200
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