上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 37 下一页
摘要: 题目关键是建模,之后就是简单地增广路。#include#include#include#include#includeusing namespace std;const int N=1024;const int inf=1q;void ford(){ int a[N],vis[... 阅读全文
posted @ 2015-08-13 10:52 xryz 阅读(102) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std;const int N=1024;const int inf=1edges;vectorG[N];int n,m,s,t;int vis[N];int d[N];int cur[N... 阅读全文
posted @ 2015-08-12 13:40 xryz 阅读(91) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;const int N=200000+5;const int inf=1<<24;int dp[N][2],a[N];char s[2*N];int main(){ int n,m,i,_;... 阅读全文
posted @ 2015-08-12 09:35 xryz 阅读(92) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;const... 阅读全文
posted @ 2015-08-11 23:01 xryz 阅读(110) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#includeusing namespace std;const int N=1024*2;const int inf=1q; while(1) { memset(p,0xff,sizeof(... 阅读全文
posted @ 2015-08-11 14:57 xryz 阅读(309) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std;int n;int x[30],y[30];class Coordinate{public: double xCoordinate; double yCoordinat... 阅读全文
posted @ 2015-08-09 10:44 xryz 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 用dp[i]表示第i种的情况,第i个上放一个木人,共有dp[i-3]+1种情况。不放木人共有dp[i-1]种情况。所以dp[i]=dp[i-1]+1+dp[i-3]。#include#include#include#includeusing namespace std;__int64... 阅读全文
posted @ 2015-08-09 10:42 xryz 阅读(102) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#includeusing namespace std;struct node{ int num; int cnt;}a[10000+5];bool cmp(node n1,node n2){ retu... 阅读全文
posted @ 2015-08-09 10:38 xryz 阅读(118) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std;int dp[100000+5],N;void zeroonepack(int cost,int weight){ for(int i=N;i>=cost;i--) ... 阅读全文
posted @ 2015-08-08 19:00 xryz 阅读(94) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;int main(){ int i,len,a,b,c; char s[100]; while(~scanf("%s",s)) { a=b=c=0; ... 阅读全文
posted @ 2015-08-08 11:53 xryz 阅读(113) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 37 下一页