09 2016 档案

摘要:题目:输入n个数,求最大的连续子段和,并输出子段的起点下标和终点下标; 思路:分治法; 代码如下: 运行截图: 阅读全文
posted @ 2016-09-30 21:57 茶飘香~ 阅读(2738) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://codeforces.com/gym/101102/problem/D problem description Given an R×C grid with each cell containing an integer, find the number of subrect 阅读全文
posted @ 2016-09-30 21:46 茶飘香~ 阅读(537) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://codeforces.com/gym/101102/problem/C problem description Judge Bahosain was bored at ACM AmrahCPC 2016 as the winner of the contest had the 阅读全文
posted @ 2016-09-30 10:45 茶飘香~ 阅读(657) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=4800 Problem Description A role-playing game (RPG and sometimes roleplaying game) is a game in which pl 阅读全文
posted @ 2016-09-23 12:24 茶飘香~ 阅读(286) 评论(0) 推荐(0) 编辑
摘要:题目:输入n 然后输入n个整数,用分治法求这n个数中的最大元; 思路:把这列数分成两半,递归下去,到只剩一个数时停止,返回这个数,如果不是一个数则返回分成的两段数最大值的较大者; 实验提示:在规模为n的数据元素集合中找出最大元。当n=2时,一次比较就可以找出两个数据元素的最大元和最小元。当n>2时, 阅读全文
posted @ 2016-09-22 15:50 茶飘香~ 阅读(758) 评论(0) 推荐(0) 编辑
摘要:题目:一只袋鼠要从河这边跳到河对岸,河很宽,但是河中间打了很多桩子,每隔一米就有一个,每个桩子上都有一个弹簧,袋鼠跳到弹簧上就可以跳的更远,每个弹簧力量不同,用一个数字代表它的力量,如果弹簧力量为5,就代表袋鼠下一跳最多能够跳5米,如果为0,就会陷进去无法继续跳跃,河流一共N米宽,袋鼠初始位置就在第 阅读全文
posted @ 2016-09-21 19:23 茶飘香~ 阅读(1847) 评论(0) 推荐(0) 编辑
摘要:参赛感想 这是第一次参加暑假多校训练,应该也会是人生中最后一次,我真的很庆幸能参加这个训练,和全国几乎所有高校的ACMer一起在一个平台上做题!昨天为止多校已经完全结束,今天看到叉姐的训练感想(叉姐的感想链接),我觉得我也有必要写下自己的训练感想。 人的眼界总是狭窄的,当在自己的学校站在前几名的时候 阅读全文
posted @ 2016-09-21 15:33 茶飘香~ 阅读(290) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=4803 Problem Description Jenny is a warehouse keeper. He writes down the entry records everyday. The re 阅读全文
posted @ 2016-09-20 21:25 茶飘香~ 阅读(453) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5880 Problem Description Steam is a digital distribution platform developed by Valve Corporation offeri 阅读全文
posted @ 2016-09-20 16:16 茶飘香~ 阅读(567) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5900 Problem Description Every school has some legends, Northeastern University is the same.Enter from 阅读全文
posted @ 2016-09-18 20:30 茶飘香~ 阅读(382) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5881 Problem Description Tea is good.Tea is life.Tea is everything.The balance of tea is a journey of p 阅读全文
posted @ 2016-09-17 21:17 茶飘香~ 阅读(404) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5884 Problem Description Recently, Bob has just learnt a naive sorting algorithm: merge sort. Now, Bob 阅读全文
posted @ 2016-09-17 20:42 茶飘香~ 阅读(585) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://vjudge.net/contest/132391#problem/G Description standard input/outputStatements — It' s a good game, — Princess said pensively. It was cle 阅读全文
posted @ 2016-09-16 21:09 茶飘香~ 阅读(322) 评论(0) 推荐(0) 编辑
摘要:题目: 在一个2^k x 2^k 个方格组成的棋盘中,若恰有一个方格与其他方格不同,则称该方格为一特殊方格,且称该棋盘为一特殊棋盘。现在要用4种不同形态的L型骨牌覆盖一个给定的特殊棋盘上除特殊方格以外的所有方格,且任意2个L型骨牌不得重叠覆盖。 解释一下什么是L型骨牌:就是由三个方格组成的一个角,可 阅读全文
posted @ 2016-09-16 15:47 茶飘香~ 阅读(817) 评论(0) 推荐(0) 编辑
摘要:题目:输入两个大整数,用数组保存每一位数,然后用分治法计算; 思路:输入X Y,X高位用A数组保存,低位用B数组保存,Y高位用C数组保存,低位用D数组保存,则:X=A*10^(n/2)+B Y=C*10^(n/2)+D 分治方法:X*Y=A*C*10^n+((A-B)*(D-C)+A*C+B*D)* 阅读全文
posted @ 2016-09-16 11:15 茶飘香~ 阅读(7950) 评论(16) 推荐(0) 编辑
摘要:在博客中写公式的两种方法(链接)因为要在博客中写公式,所以参考了别人两种方法,如下: 1,在博客设置中,html头中添加代码,导入mathML库如: <script type="text/javascript" src="http://common.cnblogs.com/script/ASCIIM 阅读全文
posted @ 2016-09-14 14:37 茶飘香~ 阅读(184) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://www.lydsy.com/JudgeOnline/problem.php?id=2038 Description 作为一个生活散漫的人,小Z每天早上都要耗费很久从一堆五颜六色的袜子中找出一双来穿。终于有一天,小Z再也无法忍受这恼人的找袜子过程,于是他决定听天由命……具体来说 阅读全文
posted @ 2016-09-14 13:46 茶飘香~ 阅读(241) 评论(0) 推荐(0) 编辑
摘要:题目:排列问题,设R={r1,r2...rn}是要进行排列的n个元素,求R的全排列perm(R); a、递归关系 Ri=R-{ri} perm(R)=U(ri)perm(Ri) b、终止条件:n=1时 c、参数 int k,int m 代码如下: 运行结果如下: 阅读全文
posted @ 2016-09-13 21:15 茶飘香~ 阅读(376) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=5869 Problem Description This is a simple problem. The teacher gives Bob a list of problems about 阅读全文
posted @ 2016-09-13 10:43 茶飘香~ 阅读(276) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=5875 Problem Description The shorter, the simpler. With this problem, you should be convinced of 阅读全文
posted @ 2016-09-11 21:32 茶飘香~ 阅读(241) 评论(0) 推荐(0) 编辑
摘要:题目链接 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2988 problem Description Flatland governme 阅读全文
posted @ 2016-09-11 15:26 茶飘香~ 阅读(413) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=4745 题意:两只兔子,在n块围成一个环形的石头上跳跃,每块石头有一个权值ai,一只从左往右跳,一只从右往左跳,每跳一次,两只兔子所在的石头的权值都要相等,在一圈内(各自不能超过各自的起点,也 阅读全文
posted @ 2016-09-10 21:52 茶飘香~ 阅读(398) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=4283 Problem Description The TV shows such as You Are the One has been very popular. In order to 阅读全文
posted @ 2016-09-10 19:59 茶飘香~ 阅读(665) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=5877 Problem Description You are given a rooted tree of N nodes, labeled from 1 to N. To the ith 阅读全文
posted @ 2016-09-10 19:11 茶飘香~ 阅读(482) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=4293 Problem Description After the regional contest, all the ACMers are walking alone a very long 阅读全文
posted @ 2016-09-09 19:59 茶飘香~ 阅读(518) 评论(0) 推荐(0) 编辑
摘要:提交链接 http://codeforces.com/gym/100781/submit Description: Ada, Bertrand and Charles often argue over which TV shows to watch, and to avoid some of the 阅读全文
posted @ 2016-09-09 18:50 茶飘香~ 阅读(712) 评论(0) 推荐(0) 编辑
摘要:莫队算法 莫队算法可用于解决一类可离线且在得到区间[l,r][l,r]的答案后,能在O(1)O(1)或O(log2n)O(log2⁡n)得到区间[l,r+1][l,r+1]或[l−1,r][l−1,r]的答案的问题 先看这样一个问题: 给出n个数字,m次询问,每次询问在区间[li,ri][li,ri 阅读全文
posted @ 2016-09-07 21:05 茶飘香~ 阅读(750) 评论(1) 推荐(0) 编辑
摘要:题目链接 http://poj.org/problem?id=1141 Description Let us define a regular brackets sequence in the following way: 1. Empty sequence is a regular sequenc 阅读全文
posted @ 2016-09-07 14:53 茶飘香~ 阅读(807) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://lightoj.com/volume_showproblem.php?problem=1031 Description You are playing a two player game. Initially there are n integer numbers in an 阅读全文
posted @ 2016-09-05 21:11 茶飘香~ 阅读(432) 评论(0) 推荐(0) 编辑
摘要:原题链接 http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1809 Description Bobo has a balanced parenthesis sequence P=p1 p2…pn of length n and q questions 阅读全文
posted @ 2016-09-03 23:26 茶飘香~ 阅读(405) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://codeforces.com/contest/711/problem/C Description ZS the Coder and Chris the Baboon has arrived at Udayland! They walked in the park where  阅读全文
posted @ 2016-09-03 10:58 茶飘香~ 阅读(518) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=5410 Problem Description Today is CRB's birthday. His mom decided to buy many presents for her lo 阅读全文
posted @ 2016-09-02 20:46 茶飘香~ 阅读(266) 评论(0) 推荐(0) 编辑
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=5396 Problem Description Teacher Mai has n numbers a1,a2,⋯,anand n−1 operators("+", "-" or "*")op 阅读全文
posted @ 2016-09-01 20:12 茶飘香~ 阅读(182) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示