摘要: Description Ignatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian gives him a history bo 阅读全文
posted @ 2016-02-25 19:15 Not-Bad 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 先来介绍一下stl中的map这个功能 头文件#include<map> map是STL的一个关联容器,它提供一对一的数据处理能力 就像一个人对应一个编号一样 定义 为 map<int, string> mapPeople;<!--?xml:namespace prefix = "o" /--> in 阅读全文
posted @ 2016-02-23 21:50 Not-Bad 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Description 我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。 Input 输入数据的第一行是一个整数C,表示测试实例的个数,然后是C 行数据,每行包含 阅读全文
posted @ 2016-02-23 20:41 Not-Bad 阅读(229) 评论(0) 推荐(0) 编辑
摘要: Description In a k bit 2's complement number, where the bits are indexed from 0 to k-1, the weight of the most significant bit (i.e., in position k-1) 阅读全文
posted @ 2016-02-23 20:07 Not-Bad 阅读(389) 评论(0) 推荐(0) 编辑
摘要: Description One measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For inst 阅读全文
posted @ 2016-02-22 23:46 Not-Bad 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 首先介绍一下next_permutation函数的用途! 按照STL文档的描述,next_permutation函数将按字母表顺序生成给定序列的下一个较大的排列,直到整个序列为降序为止。 prev_permutation函数与之相反,是生成给定序列的上一个较小的排列。 代码如下 #include<i 阅读全文
posted @ 2016-02-22 21:40 Not-Bad 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Description In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, 阅读全文
posted @ 2016-02-21 20:03 Not-Bad 阅读(257) 评论(0) 推荐(0) 编辑
摘要: Description There must be many A + B problems in our HDOJ , now a new one is coming. Give you two hexadecimal integers , your task is to calculate the 阅读全文
posted @ 2016-02-21 19:39 Not-Bad 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Description Sally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit even t 阅读全文
posted @ 2016-02-19 21:22 Not-Bad 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 长度为n的环状串有n镇南关表示法,分别为从某个位置开始顺时针得到。在这些表示法中,字典序最小的称为“最小表示”。 输入一个长度为n(n<=100)的环状DNA串(只包含A,C,G,T)的一种表示法,你的任务是输出该环状串的最小表示。例如,CTCC的最小表示是CCCT。 字典序就是字符串在字典中的顺序 阅读全文
posted @ 2016-02-18 19:37 Not-Bad 阅读(271) 评论(0) 推荐(0) 编辑