码迷,mamicode.com
首页 >  
搜索关键字:路线    ( 3918个结果
UVA11389-The Bus Driver Problem
题目链接 题意:n个司机,n个下午路线和n个夜间的行驶时间。每个司机恰好分配到一个下午路线和一个夜间路线。司机行驶如果超过规定的行驶总时间,每个单位时间要多付给司机r元,求最小要给所有司机的加班费。 思路:贪心,将两个时间段的行驶时间排序,然后依次取最大和最小相加减去规定时间。那么超过的时间将最小,加班费也会最小。  #include #include #include #...
分类:其他好文   时间:2014-08-10 21:36:00    阅读次数:284
ELF格式解析库之初始化
寻宝要先设计路线图对一个ELF文件来说,它里边装个一个程序的所有信息。我们想要拿的程序信息就在这个ELF文件的某个地址处。可是我们根本就不知道这个具体的地址是哪个,怎么办?举个较形象的例子来描述我们将要的做的事情。峨眉山的山道上放着一大箱金子,我们想搞到这箱黄金。所以在动手之前,我们应该先搞清楚这箱...
分类:其他好文   时间:2014-08-10 18:15:30    阅读次数:334
UVA - 590Always on the run(递推)
题目:UVA - 590Always on the run(递推) 题目大意:有一个小偷现在在计划着逃跑的路线,但是又想省机票费。他刚开始在城市1,必须K天都在这N个城市里跑来跑去,最后一天达到城市N,问怎样计划路线的得到最少的费用。 解题思路:一开始题目意思就理解有些问题。                   dp【k】【i】:代表在第k天小偷从某一个城市(除了i)坐飞机飞...
分类:其他好文   时间:2014-08-09 23:15:39    阅读次数:338
HDU1698_Just a Hook(线段树/成段更新)
解题报告 题意: 原本区间1到n都是1,区间成段改变成一个值,求最后区间1到n的和。 思路: 线段树成段更新,区间去和。 #include #include #include using namespace std; int sum[500000],lz[500000]; void push_up(int root,int l,int r) { sum[root]=sum...
分类:其他好文   时间:2014-08-09 11:39:47    阅读次数:343
Android学习路线(十三)Activity生命周期——停止和恢复(Pausing and Resuming )一个Activity
During normal app use, the foreground activity is sometimes obstructed by other visual components that cause the activity to pause. For example, when a semi-transparent activity opens (such as one in the style of a dialog), the previous activity pauses. As...
分类:移动开发   时间:2014-08-09 02:36:37    阅读次数:366
Android学习路线(十四)Activity生命周期——停止和重启(Stopping and Restarting)一个Activity
Properly stopping and restarting your activity is an important process in the activity lifecycle that ensures your users perceive that your app is always alive and doesn't lose their progress. There are a few of key scenarios in which your activity is stop...
分类:移动开发   时间:2014-08-09 02:36:17    阅读次数:496
Android学习路线(十五)Activity生命周期——重新创建(Recreating)一个Activity
There are a few scenarios in which your activity is destroyed due to normal app behavior, such as when the user presses the Back button or your activity signals its own destruction by calling finish(). The system may also destroy your activity if it's curr...
分类:移动开发   时间:2014-08-09 02:35:56    阅读次数:492
POJ3468_A Simple Problem with Integers(线段树/成段更新)
解题报告 题意: 略 思路: 线段树成段更新,区间求和。 #include #include #include #define LL long long #define int_now int l,int r,int root using namespace std; LL sum[500000],lazy[500000]; void push_up(int root,int l,...
分类:其他好文   时间:2014-08-09 00:18:46    阅读次数:470
Android学习路线(十一)管理Activity的生命周期
当一个用户进入,退出,再次进入你的应用时,你的应用中的Activity 会在它的生命周期的各个状态下切换。例如,当你的activity第一次启动,它出现在系统的前方接受用户的焦点。在这个过程中,Android系统调用了一系列的生命周期方法来设置UI和其他组件。如果用户执行了一个操作,启动了另一个activity或者切换到其它应用中,你的activity会移动到后台(这时activity已经不可见,但是它的实力和状态都保持不变),系统会调用另外的一些生命周期方法。...
分类:移动开发   时间:2014-08-08 08:29:35    阅读次数:181
Android学习路线(十二)Activity生命周期——启动一个Activity
Unlike other programming paradigms in which apps are launched with a main()method, the Android system initiates code in an Activity instance by invoking specific callback methods that correspond to specific stages of its lifecycle. There is a sequence of c...
分类:移动开发   时间:2014-08-08 08:28:45    阅读次数:539
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!