USACO sec2.1 Healthy Holsteins
摘要:
状态压缩,先将生成的所有状态排序,然后枚举即可。/*PROG : holsteinLANG : C*/# include <stdio.h># include <stdlib.h>struct scoop{int a[30];};int V, G, r[(1 << 17) + 5];struct scoop g[17], v;/***************************************************/int bcnt(int x){ int ret = 0; while (x) { ++ret; x &= x-1; .. 阅读全文
posted @ 2012-08-21 17:41 getgoing 阅读(293) 评论(0) 推荐(0) 编辑