- 博客(8)
- 收藏
- 关注
原创 culture文化之旅
#include#include#includeusing namespace std;const int MAX_N = 101;const int INF = 16843009;int N,K,M,S,T;int C[MAX_N];int G[MAX_N][MAX_N];int R[MAX_N][MAX_N];int dist[MAX_N];bool Inqueue[MA
2013-10-31 20:34:26 1180
原创 tractor 拖拉机
#include#include#include#includeusing namespace std;const int MAX_M = 1002;int dx[]={0,0,1,-1};int dy[]={1,-1,0,0};bool G[MAX_M][MAX_M];bool used[MAX_M][MAX_M];int f[MAX_M][MAX_M];int N;st
2013-10-31 20:32:02 907
原创 欢乐派对 堆优化+邻接表
不解释,这里只是分享代码,练练堆#include#include#include#include#includeusing namespace std;const int MAX_N = 1001;const int INF =1<<30;struct nodelink{ int s,t,w;}pnod;vector G1[MAX_N],G2[MAX_N];
2013-10-31 20:30:42 592
原创 Test 12.10.17 by Song
古老的显示屏首先是简单的宽搜每次找出最优的距离顶点(距离指该定点到亮点的最短距离)去松弛四周的顶点。如果这个顶点自己是亮的,那么他的最短距离是0不详细说,只是个大概的思路#include#include#include#includeusing namespace std;const int MAX_N = 201;const int MAX_M = 4;cons
2013-10-31 20:27:25 546
原创 子序列和问题 无分析
#include#include#includeconst int MAX_L = 101;int f[MAX_L];bool used[MAX_L];int N;int ans;int init(){ scanf("%d",&N);}int dfs(int step,int first){ if(step>N) {ans++;return 0;} int i;
2013-10-31 20:22:16 565
原创 Test 12.10.04 by Wang
1、足球比赛(football.cpp)问题描述:一场足球比赛正在进行,记分规则很简单:一场比赛中,胜方得3分,负方不得分,如果打平,双方各得一分。现给出比赛的队伍及各自的得分,统计出平局的场数。输入格式:第一行为T和N,分别表示比赛队伍数和已经进行的比赛场数(2≤T≤200,1≤N≤10000),接下来T行,每行为一个字符串和一个整数,分别表示参赛队伍的名称和它的得分。队伍名称的
2013-10-31 20:17:26 728
原创 stick棍子by Ye
这里给一下私藏的题目,棍子,挺难,不分析了,直接贴出代码,不过只有90。TLE超时。poj上有题目,大家自己看看。棍子【问题描述】一个电视节目正准备一个与观众互动的游戏,游戏的内容是让观众从箱子里抽出若干根棍子,若观众能成功地把抽出来的棍子摆成一个多边形,便可得到一份礼物。当然,为了做好这个节目,这个游戏也需要精心设计,使得游戏既不会太难而影响现场气氛,也不会太容易而缺乏挑战性
2013-10-31 20:09:36 759
原创 delivery route配送路线
这里首先奉上代码。最近有点忙。下次再发题解。#include#include#include#include#include#include#include#includeusing namespace std;const int root = 1;const int INF = 1<<30;const int MAX_T = 1000002;const int MAX
2013-10-30 22:33:38 851
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人