摘要: A/B Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5539 Accepted Submission(s): 4320 Problem Des 阅读全文
posted @ 2017-04-05 21:48 happy_codes 阅读(287) 评论(0) 推荐(0) 编辑
摘要: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1883 题意:给3个整数 n,k,m (2 ≤ n ≤ 10000, 1 ≤ k ≤ 100 阅读全文
posted @ 2017-04-05 21:38 happy_codes 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 【bzoj1452】[JSOI2009]Count Description Input Output Sample Input Sample Output 12 HINT 题解:对于每一个颜色建一个二维的树状数组O(c*logn*logm),试了试对每个颜色,每行建一个一维数组,超时了。。。O(c* 阅读全文
posted @ 2017-04-03 18:30 happy_codes 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 看到树状数组后觉得这个数据结构很优美,比较有意思,虽然很多时候线段树能做,但树状数组内存消耗更小,思想也很有意思,就想记录一下 看上去是比较漂亮的,A[] 是序列的实际数值, C[] 记录的是某一段A[]的和,例如 C[4]就是 sun(1--4)。 先介绍个很关键的函数:int lowbit(in 阅读全文
posted @ 2017-04-01 20:12 happy_codes 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 2061 Solved: 1184 Description OI island是一个非常漂亮的岛屿,自开发以来,到这儿来旅游的人很多。然而,由于该岛屿刚刚开发不久,所以那里的交通情况还是很糟糕。所以,OIE 阅读全文
posted @ 2017-03-24 22:07 happy_codes 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 1202: [HNOI2005]狡猾的商人 Description ***姹接到一个任务,为税务部门调查一位商人的账本,看看账本是不是伪造的。账本上记录了n个月以来的收入情况,其中第i 个月的收入额为Ai(i=1,2,3...n-1,n), 。当 Ai大于0时表示这个月盈利Ai 元,当 Ai小于0时表示 阅读全文
posted @ 2017-03-22 20:48 happy_codes 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Description 小西有一条很长的彩带,彩带上挂着各式各样的彩珠。已知彩珠有N个,分为K种。简单的说,可以将彩带考虑为x轴,每一个彩珠有一个对应的坐标(即位置)。某些坐标上可以没有彩珠,但多个彩珠也可以出现在同一个位置上。 小布生日快到了,于是小西打算剪一段彩带送给小布。为了让礼物彩带足够漂亮 阅读全文
posted @ 2017-03-21 21:34 happy_codes 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 20971 Accepted: 5290 Description Consider two natural numbers A and B. Let S be the sum of 阅读全文
posted @ 2017-03-21 21:25 happy_codes 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 135099 Accepted: 43146 Description Some people believe that there are three cycles in a per 阅读全文
posted @ 2017-03-21 20:59 happy_codes 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 1015: [JSOI2008]星球大战starwar Description 很久以前,在一个遥远的星系,一个黑暗的帝国靠着它的超级武器统治者整个星系。某一天,凭着一个偶然的机遇,一支反抗军摧毁了帝国的超级武器,并攻下了星系中几乎所有的星球。这些星球通过特殊的以太隧道互相直接或间接地连接。 但好景 阅读全文
posted @ 2017-03-17 21:35 happy_codes 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 4 Values whose Sum is 0 Description The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quad 阅读全文
posted @ 2017-03-12 21:46 happy_codes 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Earth Hour Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others)Total Submission(s): 1970 Accepted Submission(s): 781 Prob 阅读全文
posted @ 2017-03-08 20:21 happy_codes 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 1050: [HAOI2006]旅行comf Description 给你一个无向图,N(N<=500)个顶点, M(M<=5000)条边,每条边有一个权值Vi(Vi<30000)。给你两个顶点S和T,求一条路径,使得路径上最大边和最小边的比值最小。如果S和T之间没有路径,输出”IMPOSSIBLE 阅读全文
posted @ 2017-03-07 20:02 happy_codes 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 超级密码 Problem Description Ignatius花了一个星期的时间终于找到了传说中的宝藏,宝藏被放在一个房间里,房间的门用密码锁起来了,在门旁边的墙上有一些关于密码的提示信息:密码是一个C进制的数,并且只能由给定的M个数字构成,同时密码是一个给定十进制整数N(0<=N<=5000) 阅读全文
posted @ 2017-02-06 13:45 happy_codes 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Code vs 3027 线段覆盖 2 Code vs 3027 线段覆盖 2 Code vs 3027 线段覆盖 2 题目描述 Description 数轴上有n条线段,线段的两端都是整数坐标,坐标范围在0~1000000,每条线段有一个价值,请从n条线段中挑出若干条线段,使得这些线段两两不覆盖( 阅读全文
posted @ 2017-02-03 14:43 happy_codes 阅读(612) 评论(2) 推荐(0) 编辑
摘要: 吃糖果 Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 37428 Accepted Submission(s): 10748 Problem D 阅读全文
posted @ 2016-12-29 11:19 happy_codes 阅读(433) 评论(0) 推荐(0) 编辑
摘要: C - 白昼夢 / Daydream Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement You are given a string S consisting of lowercase Engl 阅读全文
posted @ 2016-12-16 17:03 happy_codes 阅读(405) 评论(0) 推荐(0) 编辑
摘要: An Ordinary Game Time limit : 2sec / Memory limit : 256MB Score : 500 points Problem Statement There is a string s of length 3 or greater. No two neig 阅读全文
posted @ 2016-12-16 16:57 happy_codes 阅读(285) 评论(0) 推荐(0) 编辑
摘要: Boxes and Candies Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement There are N boxes arranged in a row. Initially, the i- 阅读全文
posted @ 2016-12-16 16:53 happy_codes 阅读(469) 评论(0) 推荐(0) 编辑
摘要: Gone Fishing John is going on a fising trip. He has h hours available (1 ≤ h ≤ 16), and there are n lakes in the area (2 ≤ n ≤ 25) all reachable along 阅读全文
posted @ 2016-12-16 16:28 happy_codes 阅读(570) 评论(0) 推荐(0) 编辑