【USACO 3.4】(rockers)Raucous Rockers

摘要: ------------Prob-------------You just inherited the rights to N (1 #include int f[22][22][2];int len[22];int main(){ int i,j,k,m,n; int T; freopen("rockers.in","r",stdin); freopen("rockers... 阅读全文
posted @ 2011-09-15 23:13 青色有角三倍速 阅读(183) 评论(0) 推荐(0) 编辑

【USACO 3.4】(fence9)Electric Fence

摘要: -------------Prob--------------In this problem, `lattice points' in the plane are points with integer coordinates.In order to contain his cows, Farmer John constructs a triangular electric fence by st... 阅读全文
posted @ 2011-09-15 23:06 青色有角三倍速 阅读(117) 评论(0) 推荐(0) 编辑

【USACO 3.4】(heritage)American Heritage

摘要: ---------PROB----------Farmer John takes the heritage of his cows very seriously. He is not, however, a truly fine bookkeeper. He keeps his cow genealogies as binary trees and, instead of writing them... 阅读全文
posted @ 2011-09-15 22:56 青色有角三倍速 阅读(129) 评论(0) 推荐(0) 编辑

【机房真是】。。。各种蛋疼。。。

摘要: 渣渣。。。呵呵。。。预流推进什么的。。。呵呵。。。。渣渣。。。渣渣。。。、、走了。。。 阅读全文
posted @ 2011-09-07 20:52 青色有角三倍速 阅读(84) 评论(0) 推荐(0) 编辑

【USACO 3.3】(range)Home on the Range

摘要: -----------------Prob------------------Farmer John grazes his cows on a large, square field N (2 = 2x2) remaining. Of course, grazing areas may overlap for purposes of this report. ----------------Sol... 阅读全文
posted @ 2011-09-06 22:28 青色有角三倍速 阅读(138) 评论(0) 推荐(0) 编辑

【USACO 3.3】(shopping) Shopping Offers

摘要: ------------Prob-------------In a certain shop, each kind of product has an integer price. For example, the price of a flower is 2 zorkmids (z) and the price of a vase is 5z. In order to attract more ... 阅读全文
posted @ 2011-09-04 22:17 青色有角三倍速 阅读(168) 评论(0) 推荐(0) 编辑

【USACO 3.3】(fence) Riding the Fences

摘要: -----------Prob-----------Farmer John owns a large number of fences that must be repaired annually. He traverses the fences by riding a horse along each and every one of them (and nowhere else) and fi... 阅读全文
posted @ 2011-09-04 22:12 青色有角三倍速 阅读(173) 评论(0) 推荐(0) 编辑

【USACO 3.2】(msquare)Magic Squares

摘要: -----------Prob-------------Following the success of the magic cube, Mr. Rubik invented its planar version, called magic squares. This is a sheet composed of 8 equal-sized squares:12348765In this task... 阅读全文
posted @ 2011-09-04 22:07 青色有角三倍速 阅读(344) 评论(0) 推荐(0) 编辑

【USACO 3.2】(Ratios) Feed Ratios

摘要: ---------prob---------Farmer John feeds his cows only the finest mixture of cow food, which has three components: Barley, Oats, and Wheat. While he knows the precise mixture of these easily mixable gr... 阅读全文
posted @ 2011-09-04 22:02 青色有角三倍速 阅读(129) 评论(0) 推荐(0) 编辑

POJ1511【前向星优化】

摘要: 题目描述很有趣。。。。SPFA非常裸,但是要注意空间程序:SPFA+前向星(优化内存)写的很丑。。。但是很易懂坑爹点:中间结果可以超过1000000000,INF不要开小了最大的坑爹点:答案可以超过MAX_Longint,请自行前往64位#include#includestruct graph{ int s,t,w;};const int INF=1000000000;struct grap... 阅读全文
posted @ 2011-08-06 23:41 青色有角三倍速 阅读(123) 评论(0) 推荐(0) 编辑