码迷,mamicode.com
首页 >  
搜索关键字:usaco 题解    ( 32152个结果
斜率优化专题4——bzoj 1911: [Apio2010] 特别行动队 题解
【原题】 1911: [Apio2010]特别行动队 Time Limit: 4 Sec  Memory Limit: 64 MB Submit: 2134  Solved: 911 [Submit][Status] Description Input Output Sample Input 4 -1 10 -20 2 2 3 4 ...
分类:Windows程序   时间:2014-05-07 08:55:55    阅读次数:460
斜率优化专题3——bzoj 3156 防御准备 题解
【原题】 3156: 防御准备 Time Limit: 10 Sec  Memory Limit: 512 MB Submit: 198  Solved: 107 [Submit][Status] Description Input 第一行为一个整数N表示战线的总长度。 第二行N个整数,第i个整数表示在位置i放置守卫塔的花费Ai。 Output ...
分类:其他好文   时间:2014-05-07 08:22:07    阅读次数:318
codechef The Ball And Cups题解
The Ball And Cups At the end of a busy day, The Chef and his assistants play a game together. The game is not just for fun but also used to decide who will have to clean the kitchen. The Chef...
分类:其他好文   时间:2014-05-07 07:41:32    阅读次数:448
codechef Jewels and Stones 题解
Soma is a fashionable girl. She absolutely loves shiny stones that she can put on as jewellery accessories. She has been collecting stones since her childhood - now she has become really good with ide...
分类:其他好文   时间:2014-05-07 07:38:20    阅读次数:415
codechef Little Elephant and Permutations题解
The Little Elephant likes permutations. This time he has a permutation A[1], A[2], ..., A[N] of numbers 1, 2, ...,N. He calls a permutation A good, if the number of its inversions is equal to the n...
分类:其他好文   时间:2014-05-07 07:20:50    阅读次数:356
斜率优化专题5——bzoj 1096 [ZJOI2007]仓库建设 题解
【原题】 1096: [ZJOI2007]仓库建设 Time Limit: 10 Sec  Memory Limit: 162 MB Submit: 1998  Solved: 816 [Submit][Status] Description L公司有N个工厂,由高到底分布在一座山上。如图所示,工厂1在山顶,工厂N在山脚。 由于这座山处于高原内陆地区(干燥少雨),L公司一般...
分类:其他好文   时间:2014-05-07 06:54:45    阅读次数:374
Codechef Not a Triangle题解
找出一个数组中的三个数,三个数不能组成三角形。 三个数不能组成三角形的条件是:a + b 两边和小于第三边。 这个问题属于三个数的组合问题了。暴力法可解,但是时间效率就是O(n*n*n)了,很慢。 不过既然是组合问题就必定可以使用排序后处理的方法降低时间效率的。 这里降低时间效率的方法是: 选一个最大的数c,然后选两个小数a和b,其中a 这样可以把时间效率降到O(n*n)...
分类:其他好文   时间:2014-05-07 06:32:23    阅读次数:289
斜率优化专题2——bzoj 1010 [HNOI2008]玩具装箱toy 题解
【原题】 1010: [HNOI2008]玩具装箱toy Time Limit: 1 Sec  Memory Limit: 162 MB Submit: 5434  Solved: 1969 [Submit][Status] Description P教授要去看奥运,但是他舍不下他的玩具,于是他决定把所有的玩具运到北京。他使用自己的压缩器进行压缩,其可以将任意物品变成一堆,...
分类:其他好文   时间:2014-05-07 06:25:07    阅读次数:389
[九度OJ]货币问题,解题报告
题目 题目描述: 已知有面值为1元,2元,5元,10元,20元,50元,100元的货币若干(可认为无穷多),需支付价格为x的物品,并需要恰好支付,即没有找零产生。 求,至少需要几张货币才能完成支付。 如,若支付价格为12元的物品,最少需要一张10元和一张2元,即两张货币就可完成支付。 输入: 输入包含多组测试数据,每组仅包含一个整数p(1 输出: 对于每组输入数据,输出仅一个整数,...
分类:其他好文   时间:2014-05-07 05:04:45    阅读次数:277
codechef Subtraction Game 1题解
Subtraction Game 1 Chef is playing a game on a sequence of N positive integers, say A1, A2, ... AN. The game is played as follows. If all the numbers are equal, the game ends.Otherwise Sele...
分类:其他好文   时间:2014-05-07 03:14:01    阅读次数:280
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!