nicholas

nicholas

2007年10月3日

pku3411

摘要: dfs搜索,last记录上次到某城市的已经能够预付的路,位压缩 #include using namespace std; int ans; int a[11],b[11],c[11],p[11],r[11],last[11]; int n,m; int const inf = 1000000000; void DFS(int now,int state,int mon) { ... 阅读全文

posted @ 2007-10-03 17:43 zy_nic 阅读(326) 评论(0) 推荐(0)

2007年9月29日

今天的比赛

摘要: 高数很重要 学好数理化走遍天下都不怕 阅读全文

posted @ 2007-09-29 19:32 zy_nic 阅读(152) 评论(0) 推荐(0)

2007年9月23日

关于建图的

摘要: 有N个机器(1…N),有M(1…M)件工作需要完成。并不是每个机器都能完成所有的工作,也就是说,每个机器只能完成某一些的工作。如果在第i台机器上完成t件工作,那么需要的花费是 cost[i] * t*t。 现在告诉你每台机器可以完成的工作编号,以及每台机器的cost。请你计算出完成所有的工作需要的最小的代价 这题如果话费是cost[i]*t的话,那么,如果i能完成j号任务,那么就连i到j的... 阅读全文

posted @ 2007-09-23 11:12 zy_nic 阅读(211) 评论(0) 推荐(0)

2007年9月22日

死老鼠安装成功

摘要: 用个什么虚拟机 然后就安装了………… 然后用桌面上那个iptools将ip改成动态ip 再然后就可以上网了 然后就是这样的了 ………… 吼吼 然后表的qq咋装………… 阅读全文

posted @ 2007-09-22 00:33 zy_nic 阅读(156) 评论(0) 推荐(0)

2007年9月21日

pku3141

摘要: 那个找矩形的,n^4超时了啊- - #include #include struct point { int x,y; }; point pt[200]; int px[200],py[200]; int xn,yn; int n; int f[200][200][200],g[200][200][200]; int graph[200][200]; int fi... 阅读全文

posted @ 2007-09-21 11:40 zy_nic 阅读(228) 评论(0) 推荐(0)

2007年9月18日

先帖个题目上来

摘要: Please choose GB2312 to read Problem D. Description of Problem H has been modified. Stone IV Time limit: 6sec. Submitted: 9 ... 阅读全文

posted @ 2007-09-18 22:50 zy_nic 阅读(342) 评论(0) 推荐(0)

2007年9月17日

hnu 11028

摘要: 那天比赛的, x %y 当 x%y #include int tx[2000],ty[2000]; int f[2000][2000]; int main() { int t,i,j,ans,x,y,d,n; scanf("%d",&t); while (t--) { memset(f,0,sizeof(f)); ... 阅读全文

posted @ 2007-09-17 22:37 zy_nic 阅读(298) 评论(1) 推荐(0)
hnu 11015

摘要: Projects Time Limit: 5000ms, Special Time Limit:12500ms, Memory Limit:65536KB Total submit users: 20, Accepted... 阅读全文

posted @ 2007-09-17 21:50 zy_nic 阅读(305) 评论(0) 推荐(0)

2007年9月12日

joj 儿死三八

摘要: joj 2438 这个呢 是搜索 起初想的是记下到每个点杀k个怪的最短时间 后来发现这样是不够的,因为杀的怪有不同的组合 比如 2 3 5 ooo ooO (初始位置为0,0) 到(1,1) 杀3个怪的最短时间是3,但是有两种走法 0,0 0,1 1,1和 0,0 1,0 1,1 但是第一种走法得不到最优解 所以光记下最短时间是不够的 我呢 就是深度优先搜索 关键是减支 1.这个骑士呢... 阅读全文

posted @ 2007-09-12 16:25 zy_nic 阅读(301) 评论(3) 推荐(0)

2007年9月7日

pku 1273

摘要: 啥也不说了 最大流 注意重边 1#include 2using namespace std; 3 4//求网络最大流,邻接阵形式 5//返回最大流量,flow返回每条边的流量 6//传入网络节点数n,容量mat,源点source,汇点sink 7 8#define MAXN 210 9#define inf 2110000000 10 11int max_flow(int... 阅读全文

posted @ 2007-09-07 21:45 zy_nic 阅读(791) 评论(2) 推荐(0)