摘要: 一、Ioc容器 某天,小J心血来潮,决定建造一艘星舰,这艘星舰要搭载“与众不同最时尚,开火肯定棒”的电磁炮。于是他写了一个星舰类: StarShip在构造时必须要new一个ElectromagneticGun,依靠其实现fire的功能。即StarShip“依赖”于ElectromagneticGun 阅读全文
posted @ 2018-07-30 22:09 Pic 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Description 同一时刻有N位车主带着他们的爱车来到了汽车维修中心。维修中心共有M位技术人员,不同的技术人员对不同 的车进行维修所用的时间是不同的。现在需要安排这M位技术人员所维修的车及顺序,使得顾客平均等待的时间最 小。 说明:顾客的等待时间是指从他把车送至维修中心到维修完毕所用的时间。 阅读全文
posted @ 2017-11-21 15:18 Pic 阅读(241) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/892/problem/DD. GluttonyYou are given an array a with n distinct integers. Construct an array b by permuting a such that for every non-empty subset of indices S = {x1, x2... 阅读全文
posted @ 2017-11-18 21:26 Pic 阅读(766) 评论(0) 推荐(0) 编辑
摘要: 1005: [HNOI2008]明明的烦恼 Description 自从明明学了树的结构,就对奇怪的树产生了兴趣......给出标号为1到N的点,以及某些点最终的度数,允许在 任意两点间连线,可产生多少棵度数满足要求的树? 自从明明学了树的结构,就对奇怪的树产生了兴趣......给出标号为1到N的点 阅读全文
posted @ 2017-11-06 14:15 Pic 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Coding ContestTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2653 Accepted Submission(s): 579Problem DescriptionA coding contest will be hel... 阅读全文
posted @ 2017-10-08 18:20 Pic 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 转自:http://blog.csdn.net/aozil_yang/article/details/77929216题意:告诉你一个字符串和k , 求这个字符串中有多少不同的子串恰好出现了k 次。思路:后缀数组。我们先考虑至少出现k 次的子串, 所以我们枚举排好序的后缀i (sa[i]) 。k段k 段的枚举。假设当前枚举的是 sa[i]~sa[i + k -1]那么假设这一段的最长公共前缀 是... 阅读全文
posted @ 2017-09-11 21:39 Pic 阅读(238) 评论(0) 推荐(0) 编辑
摘要: B. Legacy题目连接:http://codeforces.com/contest/786/problem/BDescriptionRick and his co-workers have made a new radioactive formula and a lot of bad guys are after them. So Rick wants to give his legacy t... 阅读全文
posted @ 2017-08-29 17:20 Pic 阅读(280) 评论(0) 推荐(0) 编辑
摘要: A SecretTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 256000/256000 K (Java/Others)Total Submission(s): 461 Accepted Submission(s): 182Problem DescriptionToday is the birthday of SF,so VS... 阅读全文
posted @ 2017-08-19 21:10 Pic 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 早上的CF太憋屈了。第一题一开始感觉有点贪心的性质,于是瞎贪了一发,然后1WA了。然后发现可以用二分写,搞了半天二分,怎么改都是WA。在还剩10来分钟结束的时候放弃治疗了,搜题解才发现check函数有问题,check函数利用了题目贪心的性质,我直接没敢用贪心。。。一题没出,丢人。。。菜下午看了一下午博客。为了明天的CCPC,今天不看网络流了,复习一下最短路,开始看qsczse最短路的博客。题目比起... 阅读全文
posted @ 2017-08-18 22:17 Pic 阅读(107) 评论(0) 推荐(0) 编辑
摘要: B. Cards Sortingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasily has a deck of cards consisting of n cards. There is an integer on each of th... 阅读全文
posted @ 2017-08-18 20:08 Pic 阅读(176) 评论(0) 推荐(0) 编辑