03 2017 档案

摘要:Bessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to schedule her next N (1 ≤ N ≤ 1,000,00 阅读全文
posted @ 2017-03-31 19:46 joeylee97 阅读(195) 评论(0) 推荐(0) 编辑
摘要:FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= 阅读全文
posted @ 2017-03-31 18:25 joeylee97 阅读(269) 评论(0) 推荐(0) 编辑
摘要:FJ has purchased N (1 <= N <= 2000) yummy treats for the cows who get money for giving vast amounts of milk. FJ sells one treat per day and wants to m 阅读全文
posted @ 2017-03-31 17:49 joeylee97 阅读(209) 评论(0) 推荐(0) 编辑
摘要:"Help Jimmy" 是在下图所示的场景上完成的游戏。 场景中包括多个长度和高度各不相同的平台。地面是最低的平台,高度为零,长度无限。 Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒。当Jimmy落到某个平台上时,游戏者选择让它向左还是向右跑,它跑动的速度也是1米 阅读全文
posted @ 2017-03-31 16:05 joeylee97 阅读(250) 评论(0) 推荐(0) 编辑
摘要:二分算法的思想: 通过不断减小问题规模,从边界条件出发求解问题。(通常是单调性问题,判定形式较为简单) 二分算法的优点: 1.把n的时间复杂度优化到logn 2.将一个问题转化为判定性质问题求解 代码: while(l<=r) { if(check(mid) { ans = mid; r = mid 阅读全文
posted @ 2017-03-29 20:01 joeylee97 阅读(160) 评论(0) 推荐(0) 编辑
摘要:Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He i 阅读全文
posted @ 2017-03-29 17:53 joeylee97 阅读(126) 评论(0) 推荐(0) 编辑
摘要:都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。 阅读全文
posted @ 2017-03-29 16:47 joeylee97 阅读(267) 评论(0) 推荐(0) 编辑
摘要:5-46 新浪微博热门话题 (30分) 新浪微博可以在发言中嵌入“话题”,即将发言中的话题文字写在一对“#”之间,就可以生成话题链接,点击链接可以看到有多少人在跟自己讨论相同或者相似的话题。新浪微博还会随时更新热门话题列表,并将最热门的话题放在醒目的位置推荐大家关注。 本题目要求实现一个简化的热门话 阅读全文
posted @ 2017-03-28 16:17 joeylee97 阅读(1254) 评论(0) 推荐(0) 编辑
摘要:不少航空公司都会提供优惠的会员服务,当某顾客飞行里程累积达到一定数量后,可以使用里程积分直接兑换奖励机票或奖励升舱等服务。现给定某航空公司全体会员的飞行记录,要求实现根据身份证号码快速查询会员里程积分的功能。 输入格式: 输入首先给出两个正整数NN(\le 10^5≤10​5​​)和KK(\le 5 阅读全文
posted @ 2017-03-28 14:47 joeylee97 阅读(3223) 评论(0) 推荐(0) 编辑
摘要:转载自:http://www.cnblogs.com/jiu0821/p/4554352.html 求一个字符串的hash值: •现在我们希望找到一个hash函数,使得每一个字符串都能够映射到一个整数上 •比如hash[i]=(hash[i-1]*p+idx(s[i]))%mod •字符串:abc, 阅读全文
posted @ 2017-03-27 20:34 joeylee97 阅读(1518) 评论(0) 推荐(0) 编辑
摘要:实现QQ新帐户申请和老帐户登陆的简化版功能。最大挑战是:据说现在的QQ号码已经有10位数了。 输入格式: 输入首先给出一个正整数NN(\le 10^5≤10​5​​),随后给出NN行指令。每行指令的格式为:“命令符(空格)QQ号码(空格)密码”。其中命令符为“N”(代表New)时表示要新申请一个QQ 阅读全文
posted @ 2017-03-27 19:50 joeylee97 阅读(831) 评论(0) 推荐(0) 编辑
摘要:给定大量手机用户通话记录,找出其中通话次数最多的聊天狂人。 输入格式: 输入首先给出正整数NN(\le 10^5≤10​5​​),为通话记录条数。随后NN行,每行给出一条通话记录。简单起见,这里只列出拨出方和接收方的11位数字构成的手机号码,其中以空格分隔。 输出格式: 在一行中给出聊天狂人的手机号 阅读全文
posted @ 2017-03-26 17:09 joeylee97 阅读(1252) 评论(0) 推荐(0) 编辑
摘要:Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irrever 阅读全文
posted @ 2017-03-25 17:29 joeylee97 阅读(242) 评论(0) 推荐(0) 编辑
摘要:Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the ho 阅读全文
posted @ 2017-03-25 17:04 joeylee97 阅读(299) 评论(0) 推荐(1) 编辑
摘要:Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this 阅读全文
posted @ 2017-03-25 12:52 joeylee97 阅读(149) 评论(0) 推荐(0) 编辑
摘要:"OK, you are not too bad, em... But you can never pass the next test." feng5166 says."I will tell you an odd number N, and then N integers. There will 阅读全文
posted @ 2017-03-25 09:49 joeylee97 阅读(201) 评论(0) 推荐(0) 编辑
摘要:A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between 阅读全文
posted @ 2017-03-25 09:04 joeylee97 阅读(140) 评论(0) 推荐(0) 编辑
摘要:上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希 阅读全文
posted @ 2017-03-23 17:16 joeylee97 阅读(259) 评论(0) 推荐(0) 编辑
摘要:Background Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that 阅读全文
posted @ 2017-03-23 08:54 joeylee97 阅读(236) 评论(0) 推荐(0) 编辑
摘要:Farmer John's pastoral neighborhood has N farms (2 <= N <= 40,000), usually numbered/labeled 1..N. A series of M (1 <= M < 40,000) vertical and horizo 阅读全文
posted @ 2017-03-22 20:26 joeylee97 阅读(229) 评论(0) 推荐(0) 编辑
摘要:Now and then you play the following game with your friend. Your friend writes down a sequence consisting of zeroes and ones. You choose a continuous s 阅读全文
posted @ 2017-03-22 19:12 joeylee97 阅读(226) 评论(0) 推荐(0) 编辑
摘要:Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to 阅读全文
posted @ 2017-03-21 18:03 joeylee97 阅读(222) 评论(0) 推荐(0) 编辑
摘要:食物链 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 33631 Accepted: 9770 Description 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物 阅读全文
posted @ 2017-03-21 17:37 joeylee97 阅读(119) 评论(0) 推荐(0) 编辑
摘要:Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize 阅读全文
posted @ 2017-03-21 15:38 joeylee97 阅读(148) 评论(0) 推荐(0) 编辑
摘要:An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unex 阅读全文
posted @ 2017-03-21 15:14 joeylee97 阅读(155) 评论(0) 推荐(0) 编辑
摘要:相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件, 阅读全文
posted @ 2017-03-21 12:31 joeylee97 阅读(142) 评论(0) 推荐(0) 编辑
摘要:Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph 阅读全文
posted @ 2017-03-21 11:28 joeylee97 阅读(170) 评论(0) 推荐(0) 编辑
摘要:The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to describe t 阅读全文
posted @ 2017-03-20 19:58 joeylee97 阅读(256) 评论(0) 推荐(0) 编辑
摘要:Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs you 阅读全文
posted @ 2017-03-20 17:33 joeylee97 阅读(119) 评论(0) 推荐(0) 编辑
摘要:Sunny Cup 2003 - Preliminary Round April 20th, 12:00 - 17:00 Problem E: QS Network In the planet w-503 of galaxy cgb, there is a kind of intelligent c 阅读全文
posted @ 2017-03-20 16:42 joeylee97 阅读(148) 评论(0) 推荐(0) 编辑
摘要:There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say t 阅读全文
posted @ 2017-03-20 16:17 joeylee97 阅读(178) 评论(0) 推荐(0) 编辑
摘要:You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write 阅读全文
posted @ 2017-03-20 16:08 joeylee97 阅读(266) 评论(0) 推荐(0) 编辑
摘要:You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible 阅读全文
posted @ 2017-03-20 15:39 joeylee97 阅读(232) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include #include #include #include #include #include #include #include using namespace std; /* 单源最短路 路径方向与switch方向同向那么路径权值0,否则为1 */ #define MAXN 101 #define INF 0x3f3f3f3f... 阅读全文
posted @ 2017-03-18 10:39 joeylee97 阅读(146) 评论(0) 推荐(0) 编辑
摘要:In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate 阅读全文
posted @ 2017-03-18 08:56 joeylee97 阅读(207) 评论(0) 推荐(0) 编辑
摘要:Floyd算法是穷举图中所有中转点,不断优化起点到终点的距离,可以用来求多源最短路问题和传递闭包。 H——Cow Contest N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming 阅读全文
posted @ 2017-03-16 09:48 joeylee97 阅读(148) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include #include #include #include using namespace std; #define MAXN 101 #define INF 0x3f3f3f3f /* 8:19 8:35 题意理解太慢:在所有最短路路中间一条最长的 8:52 sscanf用法 8:57 忘记BEEN,g[i][j] = g[j]... 阅读全文
posted @ 2017-03-16 09:02 joeylee97 阅读(156) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 #define MAXN 1004 9 #define INF 0x3f3f3f3f 10 /* 11 18 08 12 18 23 13 超时 14 18 24 15 18 33 16 超时 1... 阅读全文
posted @ 2017-03-15 18:47 joeylee97 阅读(214) 评论(0) 推荐(0) 编辑

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