题意:
输入 n 个人,3是表示有多少时间让编号1 的人召集人马。
然后按2到n 的编号 输入pi 和ti。分别是那个人直接 领主,和召集自己本部的人所需的时间。 编号1 是大领主 。 假设 每个领主都只能在 直属下属 有≥x% 的人召齐了人马才可以开始招自己的人。 问x最大是多少,可以让大领主在 t 的时间内 召齐自己的人出发打仗。
做法:
二分x,判断下这个x能否在所需时间内召齐人马。...
分类:
其他好文 时间:
2015-03-16 23:10:57
阅读次数:
231
django_templateThe Django template languagetemplate模板是一个简单的文本文件,可以生成文本格式(HTML,XML,CSV) 模板包含变量,这些变量将会被赋值例如:{% extends "base_generic.html" %}{% block ti...
分类:
其他好文 时间:
2015-03-16 23:01:44
阅读次数:
315
1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 9 10 int main(void) 11 { 12 srand((unsigned)ti...
分类:
其他好文 时间:
2015-03-15 16:41:50
阅读次数:
194
{pc:content action="lists" catid="$catid" num="25" order="id DESC" page="$page" moreinfo="1"}{loop $data $r}{date('Y-m-d H:i:s',$r[inputtime])}·{$r[ti...
分类:
Web程序 时间:
2015-03-14 18:20:49
阅读次数:
151
1.NoRouteToHostException异常问题的原因及解决 (转自:http://performtest163.blog.163.com/blog/static/14007696420115295119462) 1). 根据TCP/IP协议,连接断开之后,端口不会立刻被释放,而是处于TI....
分类:
系统相关 时间:
2015-03-13 20:33:02
阅读次数:
182
题意:问你将含有黑白点的无向树使得每个子树中只有一个黑点的方法数。解题思路:树形dp,dp[i][0/1] 表示 第i 个节点的联通图中是否有 1个黑点的种类数。解题代码: 1 // File Name: 461c.cpp 2 // Author: darkdream 3 // Created Ti...
分类:
移动开发 时间:
2015-03-11 18:53:20
阅读次数:
191
在docker中共享本地目录docker run -v localFile:dockerFile -ti imageName command例:docker run -v ~/:/root -ti stocsis/hadoop-2.6.0:v1 bash注:路径必须为绝对路径查看最近运行的docke...
分类:
其他好文 时间:
2015-03-11 14:24:33
阅读次数:
183
Problem Description
Queues and Priority Queues are data structures which are known to most computer scientists. The Queue occurs often in our daily life. There are many people lined up at the lunch ti...
分类:
其他好文 时间:
2015-03-10 21:28:06
阅读次数:
154
Given a non-empty tree with root R, and with weight Wiassigned to each tree node Ti. Theweight of a path from R to Lis defined to be the sum of the we...
分类:
其他好文 时间:
2015-03-08 11:38:19
阅读次数:
217
2.1 Date类及常用方法
java.util.Date类用于封装日期和时间信息。目前Date类的大多数用于进行时间分量计算的方法已经被Calendar取代。
无参的构造方法,构造的Date对象封装当前的日期和时间信息
Date date=new Date();
Date类已经重新了toString对象
getTime()方法:获取1970年1月1日距今的毫秒数,例如
long ti...
分类:
编程语言 时间:
2015-03-05 16:59:58
阅读次数:
151