随笔分类 -  2016寒假加强作业

HDU
摘要: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 阅读(288) 评论(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 阅读(197) 评论(0) 推荐(0)
摘要:Description 我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。 Input 输入数据的第一行是一个整数C,表示测试实例的个数,然后是C 行数据,每行包含 阅读全文
posted @ 2016-02-23 20:41 Not-Bad 阅读(237) 评论(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 阅读(400) 评论(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 阅读(383) 评论(0) 推荐(0)
摘要:首先介绍一下next_permutation函数的用途! 按照STL文档的描述,next_permutation函数将按字母表顺序生成给定序列的下一个较大的排列,直到整个序列为降序为止。 prev_permutation函数与之相反,是生成给定序列的上一个较小的排列。 代码如下 #include<i 阅读全文
posted @ 2016-02-22 21:40 Not-Bad 阅读(175) 评论(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 阅读(263) 评论(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 阅读(216) 评论(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 阅读(550) 评论(0) 推荐(0)
摘要:Description A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down 阅读全文
posted @ 2016-02-18 18:48 Not-Bad 阅读(219) 评论(0) 推荐(0)
摘要:Description Soon after he decided to design a T-shirt for our Algorithm Board on Free-City BBS, XKA found that he was trapped by all kinds of suggesti 阅读全文
posted @ 2016-02-16 18:36 Not-Bad 阅读(231) 评论(0) 推荐(0)
摘要:Description During his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, profe 阅读全文
posted @ 2016-02-16 16:48 Not-Bad 阅读(303) 评论(0) 推荐(0)
摘要:Description 今年的ACM暑期集训队一共有18人,分为6支队伍。其中有一个叫做EOF的队伍,由04级的阿牛、XC以及05级的COY组成。在共同的集训生活中,大家建立了深厚的友谊,阿牛准备做点什么来纪念这段激情燃烧的岁月,想了一想,阿牛从家里拿来了一块上等的牛肉干,准备在上面刻下一个长度为n 阅读全文
posted @ 2016-02-14 20:31 Not-Bad 阅读(200) 评论(0) 推荐(0)
摘要:Description 在2×n的一个长方形方格中,用一个1× 2的骨牌铺满方格,输入n ,输出铺放方案的总数. 例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图: Input 输入数据由多行组成,每行包含一个整数n,表示该测试实例的长方形方格的规格是2×n (0<n<=50)。 Outp 阅读全文
posted @ 2016-02-14 20:25 Not-Bad 阅读(189) 评论(0) 推荐(0)
摘要:Description 有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行。请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数。 其中,蜂房的结构如下所示。 Input 输入数据的第一行是一个整数N,表示测试实例的个数,然后是N 行数据,每行包含两个整数a和b(0<a<b<50)。 Output 对 阅读全文
posted @ 2016-02-14 20:19 Not-Bad 阅读(317) 评论(0) 推荐(0)
摘要:Description A single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2... 阅读全文
posted @ 2016-02-12 00:42 Not-Bad 阅读(282) 评论(0) 推荐(0)
摘要:Description T. Chur teaches various groups of students at university U. Every U-student has a unique Student Identification Number (SIN). A SIN s is a 阅读全文
posted @ 2016-02-11 23:40 Not-Bad 阅读(286) 评论(0) 推荐(0)
摘要:Description Bessie is training for her next race by running on a path that includes hills so that she will be prepared for any terrain. She has planne 阅读全文
posted @ 2016-02-11 23:13 Not-Bad 阅读(316) 评论(0) 推荐(0)
摘要:Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that d 阅读全文
posted @ 2016-02-11 22:34 Not-Bad 阅读(206) 评论(0) 推荐(0)
摘要:Description The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in th 阅读全文
posted @ 2016-02-11 20:47 Not-Bad 阅读(389) 评论(0) 推荐(0)