摘要: Description为了跟踪所有的牛,农夫JOHN在农场上装了一套自动系统. 他给了每一个头牛一个电子牌号 当牛走过这个系统时,牛的名字将被自动读入. 每一头牛的电子名字是一个长度为M (1 2 #include 3 #include 4 #include 5 using namespace s... 阅读全文
posted @ 2015-10-23 21:41 HTWX 阅读(146) 评论(0) 推荐(0) 编辑
摘要: DescriptionLacking even a fifth grade education, the cows are having trouble with a fraction problem from their textbook. Please help them. The proble... 阅读全文
posted @ 2015-10-23 10:07 HTWX 阅读(103) 评论(0) 推荐(0) 编辑
摘要: DescriptionFarmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouet... 阅读全文
posted @ 2015-10-23 09:45 HTWX 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Description Farmer John has a problem: the dirt road from his farm to town has suffered in the recent rainstorms and now contains (1 <= N <= 10,000) m 阅读全文
posted @ 2015-10-23 08:51 HTWX 阅读(174) 评论(0) 推荐(0) 编辑
摘要: DescriptionFarmer John有B头奶牛(1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include10 #define maxn 5001011 #define m... 阅读全文
posted @ 2015-10-23 08:25 HTWX 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Description没有几个人知道,奶牛有她们自己的字典,里面的有W (1 ≤ W ≤ 600)个词,每个词的长度不超过25,且由小写字母组成.她们在交流时,由于各种原因,用词总是不那么准确.比如,贝茜听到有人对她说"browndcodw",确切的意思是"browncow",多出了两个"d",这两... 阅读全文
posted @ 2015-10-22 14:50 HTWX 阅读(160) 评论(0) 推荐(0) 编辑
摘要: DescriptionFJ's N (1 = h[a]Input* Line 1: Four space-separated integers: N, I, H and R* Lines 2..R+1: Two distinct space-separated integers A and B (1... 阅读全文
posted @ 2015-10-20 11:45 HTWX 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Description农夫约翰已经从他的牧场中取得了数不清块数的正方形草皮,草皮的边长总是整数(有时农夫约翰割草皮的刀法不合适,甚至切出了边长为0的正方形草皮),他已经把草皮放在了一个奶牛贝茜已经知道的地方。 贝茜总是希望把美味的草皮放到她的秘密庄园里,她决定从这些草皮中取出恰好4块搬到她的秘密庄园... 阅读全文
posted @ 2015-10-20 11:27 HTWX 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Description Farmer John新买的干草打包机的内部结构大概算世界上最混乱的了,它不象普通的机器一样有明确的内部传动装置,而是,N (2 <= N <= 1050)个齿轮互相作用,每个齿轮都可能驱动着多个齿轮。 FJ记录了对于每个齿轮i,记录了它的3个参数:X_i,Y_i表示齿轮中心 阅读全文
posted @ 2015-10-19 14:52 HTWX 阅读(151) 评论(0) 推荐(0) 编辑
摘要: DescriptionFarmer John 决定给他的奶牛们照一张合影,他让 N (1 ≤ N ≤ 50,000) 头奶牛站成一条直线,每头牛都有它的坐标(范围: 0..1,000,000,000)和种族(0或1)。 一直以来 Farmer John 总是喜欢做一些非凡的事,当然这次照相也不例外。... 阅读全文
posted @ 2015-10-19 10:57 HTWX 阅读(128) 评论(0) 推荐(0) 编辑