Healthy HolsteinsBurch & Kolstad Farmer John prides himself on having the healthiest dairy cows in the world. He knows the vitamin content for one scoop of each feed type and the minimum daily vitamin requirement for the cows. Help Farmer John feed h…
首先看题目: Healthy HolsteinsBurch & Kolstad Farmer John prides himself on having the healthiest dairy cows in the world. He knows the vitamin content for one scoop of each feed type and the minimum daily vitamin requirement for the cows. Help Farmer John…
/* TASK: holstein LANG: C++ URL: http://train.usaco.org/usacoprob2?a=SgkbOSkonr2&S=holstein SOLVE: con[i][j]为食物i含有维生素j的量,ned[i]为需要的维生素i的量 bfs,用二进制保存状态 */ #include<cstdio> #define N 30 int v,g,ned[N],con[N][N]; int now[N]; int l,r,q[40000]; bool…