Alice's Chance Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 7327 Accepted: 2992 Description Alice, a charming girl, have been dreaming of being a movie star for long. Her chances will come now, for several filmmaking companies invit…
最大流简单题,,这题重要的是知道了scanf("%s",str);sscanf(str,"(%d,%d)%d",&x,&y,&w);读入方式 #include<stdio.h> #include<string.h> const int N=210; const int inf=0x3fffffff; int dis[N],gap[N],head[N],num,start,end,ans,n,m; struct edge…
Paratroopers Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 3308 Appoint description: System Crawler (2014-10-14) Description It is year 2500 A.D. and there is a terrible war between the forc…
On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, to an adjacent point. For each little man, you need to pay a $1 travel fee for every step he moves, unt…
Jamie's Contact Groups Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 7624 Accepted: 2562 Description Jamie is a very popular girl and has quite a lot of friends, so she always keeps a very long contact list in her cell phone. The con…
March of the Penguins Time Limit: 8000MS Memory Limit: 65536K Total Submissions: 4809 Accepted: 2195 Description Somewhere near the south pole, a number of penguins are standing on a number of ice floes. Being social animals, the penguins would l…
Dining Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 17251 Accepted: 7643 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 fabulo…
题目链接:http://poj.org/problem?id=3436 大力套kuangbin板过了orz #include<cstdio> #include<cstring> using namespace std; ; ; const int INF = 0x3f3f3f3f; struct Edge { int to,next,cap,flow; } edge[MAXM]; int tol; int head[MAXN]; int gap[MAXN],dep[MAXN],pr…
Time Limit: 2000MS Memory Limit: 32768K Total Submissions: 24788 Accepted: 12922 Description A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amou…
A Plug for UNIX Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15597 Accepted: 5308 Description You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an int…
没啥好说的,慢慢建图 Sample Input 4 A B C D 5 laptop B phone C pager B clock B comb X 3 B X X A X D Sample Output 1 题意:有n个不同的插座,有m台不同的机器需要m种插头,有k组转换:插头A能由插头B转换而来.问这些机器最少有几台不能插上插座. #include<cstdio> #include<iostream> #include<algorithm> #include<…
从左上角到有下角k次能获得的最大值. 跟hdu 2686一样的题目,这题一个点可以重复走,只能得到一次值. #include<stdio.h> #include<string.h> #include<queue> const int N=5100; const int inf=0x3fffffff; using namespace std; int dist[N],head[N],num,start,end,n,vis[N],pre[N]; struct edge {…