05 2015 档案

ACM学习历程—HDU 4726 Kia's Calculation( 贪心&&计数排序)
摘要:DescriptionDoctor Ghee is teaching Kia how to calculate the sum of two integers. But Kia is so careless and alway forget to carry a number when the su... 阅读全文

posted @ 2015-05-30 21:36 AndyQsmart 阅读(247) 评论(0) 推荐(0)

ACM学习历程—FZU 2140 Forever 0.5(计算几何 && 构造)
摘要:DescriptionGiven an integer N, your task is to judge whether there exist N points in the plane such that satisfy the following conditions:1. The dista... 阅读全文

posted @ 2015-05-30 20:54 AndyQsmart 阅读(584) 评论(0) 推荐(0)

ACM学习历程—HDU4717 The Moving Points(模拟退火 || 三分法)
摘要:DescriptionThere are N points in total. Every point moves in certain direction and certain speed. We want to know at what time that the largest distan... 阅读全文

posted @ 2015-05-27 21:42 AndyQsmart 阅读(752) 评论(0) 推荐(0)

ACM学习历程—HDU4725 The Shortest Path in Nya Graph(SPFA && 优先队列)
摘要:DescriptionThis is a very easy problem, your task is just calculate el camino mas corto en un grafico, and just solo hay que cambiar un poco el algori... 阅读全文

posted @ 2015-05-26 21:33 AndyQsmart 阅读(236) 评论(0) 推荐(0)

ACM学习历程—BestCoder 2015百度之星资格赛1006 单调区间(组合数学)
摘要:Problem Description百小度最近在逛博客,然后发现了一个有趣的问题。如下图所示,是一个12位数014326951987, 它的数字先逐渐变大, 然后变小,再变大,接着变小,又变大,最后变小。我们就称,其共包含6个单调区间。现在问题来了:一个n位数平均包含多少个单调区间?单调区间的平均... 阅读全文

posted @ 2015-05-25 21:25 AndyQsmart 阅读(243) 评论(0) 推荐(0)

ACM学习历程—BestCoder 2015百度之星资格赛1004 放盘子(策略 && 计算几何)
摘要:Problem Description小度熊喜欢恶作剧。今天他向来访者们提出一个恶俗的游戏。他和来访者们轮流往一个正多边形内放盘子。最后放盘子的是获胜者,会赢得失败者的一个吻。玩了两次以后,小度熊发现来访者们都知道游戏的必胜策略。现在小度熊永远是先手,他想知道他是否能获胜。注意盘子不能相交也不能和多... 阅读全文

posted @ 2015-05-25 21:11 AndyQsmart 阅读(296) 评论(0) 推荐(0)

ACM学习历程—HDU4720 Naive and Silly Muggles(计算几何)
摘要:Description Three wizards are doing a experiment. To avoid from bothering, a special magic is set around them. The magic forms a circle, which covers ... 阅读全文

posted @ 2015-05-24 22:08 AndyQsmart 阅读(355) 评论(0) 推荐(0)

ACM学习历程—HDU1719 Friend(数论)
摘要:Description Friend number are defined recursively as follows. (1) numbers 1 and 2 are friend number; (2) if a and b are friend numbers, so is ab... 阅读全文

posted @ 2015-05-24 21:43 AndyQsmart 阅读(276) 评论(0) 推荐(0)

ACM学习历程—HDU1717 小数化分数2(gcd)
摘要:Description Ray 在数学课上听老师说,任何小数都能表示成分数的形式,他开始了化了起来,很快他就完成了,但他又想到一个问题,如何把一个循环小数化成分数呢? 请你写一个程序不但可以将普通小数化成最简分数,也可以把循环小数化成最简分数。 Input ... 阅读全文

posted @ 2015-05-24 21:31 AndyQsmart 阅读(511) 评论(0) 推荐(0)

ACM学习历程—HDU1716 排列2(dfs && set容器)
摘要:Description Ray又对数字的列产生了兴趣: 现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数。 Input 每组数据占一行,代表四张卡片上的数字(0#include #include #include... 阅读全文

posted @ 2015-05-24 21:23 AndyQsmart 阅读(382) 评论(0) 推荐(0)

ACM学习历程—BestCoder 2015百度之星资格赛1001 大搬家(递推 && 组合数学)
摘要:Problem Description近期B厂组织了一次大搬家,所有人都要按照指示换到指定的座位上。指示的内容是坐在位置i上的人要搬到位置j上。现在B厂有N个人,一对一到N个位置上。搬家之后也是一一对应的,改变的只有位次。在第一次搬家后,度度熊由于疏忽,又要求大家按照原指示进行了一次搬家。于是,机智... 阅读全文

posted @ 2015-05-23 22:02 AndyQsmart 阅读(471) 评论(0) 推荐(0)

ACM学习历程—BestCoder 2015百度之星资格赛1002 列变位法解密(vector容器)
摘要:Problem Description列变位法是古典密码算法中变位加密的一种方法,具体过程如下 将明文字符分割成个数固定的分组(如5个一组,5即为密钥),按一组一行的次序整齐排列,最后不足一组不放置任何字符,完成后按列读取即成密文。比如:原文:123456789密钥:4变换后的矩阵:12345678... 阅读全文

posted @ 2015-05-23 21:41 AndyQsmart 阅读(377) 评论(0) 推荐(0)

ACM学习历程—BestCoder 2015百度之星资格赛1003 IP聚合(set容器)
摘要:Problem Description当今世界,网络已经无处不在了,小度熊由于犯了错误,当上了度度公司的网络管理员,他手上有大量的 IP列表,小度熊想知道在某个固定的子网掩码下,有多少个网络地址。网络地址等于子网掩码与 IP 地址按位进行与运算后的结果,例如:子网掩码:A.B.C.DIP 地址:a.... 阅读全文

posted @ 2015-05-23 20:55 AndyQsmart 阅读(728) 评论(0) 推荐(0)

ACM学习历程—HDU 1059 Dividing(dp && 多重背包)
摘要:DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the ... 阅读全文

posted @ 2015-05-20 17:14 AndyQsmart 阅读(256) 评论(0) 推荐(0)

ACM学习历程—CodeForces 176B Word Cut(字符串匹配 && dp && 递推)
摘要:DescriptionLet's consider one interesting word game. In this game you should transform one word into another through special operations.Let's say we h... 阅读全文

posted @ 2015-05-18 17:35 AndyQsmart 阅读(231) 评论(0) 推荐(0)

ACM学习历程—NPU1086 随机数 2015年陕西省程序设计竞赛网络预赛(正式赛)C题 (计数排序 || set容器)
摘要:Description开学了,ACM队的边老板想在学校中请一些妹子一起做一项问卷调查,调查妹子们对ACM的了解情况,为了实验的客观性,他先用计算机生成了N个1到1000之间的随机整数(N≤100),对于其中重复的数字,只保留一个,把其余相同的数去掉,不同的数对应着不同的妹子的编号。然后再把这些数从小... 阅读全文

posted @ 2015-05-17 14:58 AndyQsmart 阅读(213) 评论(0) 推荐(0)

ACM学习历程—Hihocoder编程之美测试赛B题 大神与三位小伙伴(组合数学 )
摘要:时间限制:2000ms单点时限:1000ms内存限制:256MB描述给你一个m x n (1 #include #include #include #include #include #include #include #include #include #include #define inf 0... 阅读全文

posted @ 2015-05-17 14:23 AndyQsmart 阅读(248) 评论(0) 推荐(0)

ACM学习历程—Hihocoder 1164 随机斐波那契(数学递推)
摘要:时间限制:5000ms单点时限:1000ms内存限制:256MB描述大家对斐波那契数列想必都很熟悉:a0 = 1, a1 = 1, ai = ai-1 + ai-2,(i > 1)。现在考虑如下生成的斐波那契数列:a0 = 1, ai = aj + ak, i > 0, j, k从[0, i-1]的... 阅读全文

posted @ 2015-05-17 11:43 AndyQsmart 阅读(695) 评论(5) 推荐(1)

ACM学习历程—NPU1045 2015年陕西省程序设计竞赛网络预赛(热身赛)C题 Graph Theory(递推 && 组合数学 && 大数)
摘要:DescriptionIn graph theory, a matching or independent edge set in a graph G = (V , E) is a set of edges ME such that no two edges in the matching M sh... 阅读全文

posted @ 2015-05-17 11:09 AndyQsmart 阅读(471) 评论(0) 推荐(0)

ACM学习历程—ZOJ 3861 Valid Pattern Lock(dfs)
摘要:DescriptionPattern lock security is generally used in Android handsets instead of a password. The pattern lock can be set by joining points on a 3 × 3... 阅读全文

posted @ 2015-05-16 20:36 AndyQsmart 阅读(277) 评论(0) 推荐(0)

ACM学习历程—NPU 2015年陕西省程序设计竞赛网络预赛(正式赛)F题 和谐的比赛(递推)
摘要:Description今天西工大举办了一场比赛总共有m+n人,但是有m人比较懒没带电脑,另外的n个人带了电脑。不幸的是,今天机房的电脑全坏了只能用带的电脑,一台电脑最多两人公用,确保n>=m。但是大家来的时间不同,随机次序来机房,带电脑的人直接准备比赛而没带电脑的人需要向带电脑并还没和别人公用的人求... 阅读全文

posted @ 2015-05-16 20:17 AndyQsmart 阅读(402) 评论(0) 推荐(1)

ACM学习历程—NPU 2015年陕西省程序设计竞赛网络预赛(正式赛)E题 简单题(同余 && 快速幂)
摘要:Description定义F(n,k) = 1^k +2^k +3^k …… +n^k。(1#include #include #include #include #include #include #include #include #include #define N 10007#define ... 阅读全文

posted @ 2015-05-16 20:06 AndyQsmart 阅读(240) 评论(0) 推荐(0)

ACM学习历程—NPU 2015年陕西省程序设计竞赛网络预赛(正式赛)A题 小女警的异世界之战(dfs && 分治)
摘要:Description这一天,小女警花花,泡泡和毛毛来到终极Boss"Him"所在的异世界并准备与其决一死战,却被困在了他的城堡里。她们发现异世界是一个巨大的城堡。城堡由一个个大小不同的房间组成,房间有着以下的规则:每个房间有且仅有一扇黄门,此外至多有一扇红门和一扇绿门:黄色代表通向更大的房间,绿色... 阅读全文

posted @ 2015-05-16 19:57 AndyQsmart 阅读(216) 评论(0) 推荐(0)

ACM学习历程—HDU1003 Max Sum(dp && 最大子序列和)
摘要:DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the ma... 阅读全文

posted @ 2015-05-12 18:07 AndyQsmart 阅读(219) 评论(0) 推荐(0)

ACM学习历程—POJ1088 滑雪(dp && 记忆化搜索)
摘要:DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 ... 阅读全文

posted @ 2015-05-12 17:13 AndyQsmart 阅读(214) 评论(0) 推荐(0)

ACM学习历程—ZOJ3471 Most Powerful(dp && 状态压缩 && 记忆化搜索 && 位运算)
摘要:DescriptionRecently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of th... 阅读全文

posted @ 2015-05-10 20:42 AndyQsmart 阅读(344) 评论(0) 推荐(0)

ACM学习历程—POJ1151 Atlantis(扫描线 && 线段树)
摘要:DescriptionThere are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of par... 阅读全文

posted @ 2015-05-04 10:34 AndyQsmart 阅读(431) 评论(0) 推荐(0)

ACM学习历程—ZOJ3878 Convert QWERTY to Dvorak(Hash && 模拟)
摘要:DescriptionEdward, a poor copy typist, is a user of the Dvorak Layout. But now he has only a QWERTY Keyboard with a broken Caps Lock key, so Edward n... 阅读全文

posted @ 2015-05-02 20:24 AndyQsmart 阅读(368) 评论(0) 推荐(0)

AndyQsmart ACM学习历程——ZOJ3872 Beauty of Array(递推)
摘要:DescriptionEdward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the array. Now Edward... 阅读全文

posted @ 2015-05-02 20:20 AndyQsmart 阅读(240) 评论(0) 推荐(0)

AndyQsmart ACM学习历程——ZOJ3870 Team Formation(位运算)
摘要:DescriptionFor an upcoming programming contest, Edward, the headmaster of Marjar University, is forming a two-man team from N students of his universi... 阅读全文

posted @ 2015-05-02 20:04 AndyQsmart 阅读(289) 评论(0) 推荐(0)

ACM学习历程——HDU3333 Turing Tree(线段树 && 离线操作)
摘要:Problem DescriptionAfter inventing Turing Tree, 3xian always felt boring when solving problems about intervals, because Turing Tree could easily have ... 阅读全文

posted @ 2015-05-02 11:27 AndyQsmart 阅读(507) 评论(0) 推荐(0)

ACM学习历程——HDU2227 Find the nondecreasing subsequences(线段树 && dp)
摘要:DescriptionHow many nondecreasing subsequences can you find in the sequence S = {s1, s2, s3, ...., sn} ? For example, we assume that S = {1, 2, 3}, an... 阅读全文

posted @ 2015-05-01 19:50 AndyQsmart 阅读(217) 评论(0) 推荐(0)

导航