摘要: Almost Union-Find I hope you know the beautiful Union-Find structure. In this problem, you're to implement something similar, but not identical. The d 阅读全文
posted @ 2017-07-23 13:50 yzm10 阅读(234) 评论(0) 推荐(0) 编辑
摘要: The kth great number Xiao Ming and Xiao Bao are playing a simple Numbers game. In a round Xiao Ming can choose to write down a number, or ask Xiao Bao 阅读全文
posted @ 2017-07-23 13:17 yzm10 阅读(344) 评论(0) 推荐(0) 编辑
摘要: Feel Good Bill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studying how good or bad days in 阅读全文
posted @ 2017-07-23 13:10 yzm10 阅读(252) 评论(0) 推荐(0) 编辑
摘要: Fence Repair Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,0 阅读全文
posted @ 2017-07-23 12:05 yzm10 阅读(281) 评论(0) 推荐(0) 编辑
摘要: Wireless Network An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap compu 阅读全文
posted @ 2017-07-23 11:49 yzm10 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Battle City Many of us had played the game "Battle city" in our childhood, and some people (like me) even often play it on computer now. What we are d 阅读全文
posted @ 2017-07-22 22:49 yzm10 阅读(276) 评论(0) 推荐(0) 编辑
摘要: Stones Because of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking may cause a lit 阅读全文
posted @ 2017-07-22 20:49 yzm10 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Passing the Message Passing the Message What a sunny day! Let’s go picnic and have barbecue! Today, all kids in “Sun Flower” kindergarten are prepared 阅读全文
posted @ 2017-07-22 20:38 yzm10 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1. 1. 题目 我的提交 GZS的三角形 发布时间: 2015年9月6日 15:18 最后更新: 2016年6月26日 12:10 时间限制: 1000ms 内存限制: 256M 描述 机智无比的G神今天完成了一天的任务,实在是无聊的紧,拿起一支笔在纸上画起了三角形,边长为1, 2, 3,.... 阅读全文
posted @ 2017-07-21 10:34 yzm10 阅读(350) 评论(0) 推荐(0) 编辑
摘要: War chess is hh's favorite game: In this game, there is an N * M battle map, and every player has his own Moving Val (MV). In each round, every player 阅读全文
posted @ 2017-07-21 09:47 yzm10 阅读(296) 评论(1) 推荐(1) 编辑
摘要: Count the Sheep Count the Sheep Count the Sheep 题意: 问题描述 输入描述 输出描述 输入样例 输出样例 Hint 第一想法就是直接dfs爆搜,结果还是被hack了。 后来看队友的思路,在这个二分图中,我们枚举每一段男女关系,然后由男的延伸出一个女的, 阅读全文
posted @ 2017-07-20 21:42 yzm10 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Restructuring Company Even the most successful company can go through a crisis period when you have to make a hard decision — to restructure, discard 阅读全文
posted @ 2017-07-20 21:06 yzm10 阅读(545) 评论(0) 推荐(0) 编辑
摘要: Stall Reservations Oh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise time interval A..B 阅读全文
posted @ 2017-07-20 16:41 yzm10 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 冰清玉洁丶YCB 发布时间: 2017年6月18日 21:39 最后更新: 2017年6月18日 21:40 时间限制: 1000ms 内存限制: 256M 描述 YCB是公认的冰清玉洁,人称锦州刚猛好男儿,凌河区一把刀。 一天YCB来到了一个n × m迷宫,每一个单位或者是空地("."),或者是墙 阅读全文
posted @ 2017-07-20 13:30 yzm10 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 小希的迷宫 小希的迷宫 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间 阅读全文
posted @ 2017-07-19 13:17 yzm10 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 分辣条 发布时间: 2016年6月26日 20:36 最后更新: 2016年6月26日 20:37 时间限制: 1000ms 内存限制: 128M 描述 “你喝的酸奶是我买的,辣条也是我买的,你现在要跟我分手,你把我当什么?” “因为你每次分辣条的时候都比我多一根!” 可见分好辣条是一件多么重要的事 阅读全文
posted @ 2017-07-19 00:24 yzm10 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 1867: 礼上往来 Description 每当节日来临,女友众多的xxx总是能从全国各地的女友那里收到各种礼物。 有礼物收到当然值得高兴,但回礼确是件麻烦的事! 无论多麻烦,总不好意思收礼而不回礼,那也不是xxx的风格。 现在,即爱面子又抠门的xxx想出了一个绝妙的好办法:他准备将各个女友送来的 阅读全文
posted @ 2017-07-18 22:34 yzm10 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Description Our Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black Box 阅读全文
posted @ 2017-07-18 21:51 yzm10 阅读(298) 评论(0) 推荐(0) 编辑
摘要: priority_queue的用法 priority_queue调用 STL里面的 make_heap(), pop_heap(), push_heap() 算法实现,也算是堆的另外一种形式。先写一个用 STL 里面堆算法实现的与真正的STL里面的 priority_queue用法相似的priori 阅读全文
posted @ 2017-07-18 20:32 yzm10 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 一道简单的数据结构题 发布时间: 2017年6月3日 18:46 最后更新: 2017年6月3日 18:51 时间限制: 1000ms 内存限制: 128M 描述 如果插入“+”和“1”到一个括号序列,我们能得到一个正确的数学表达式,我们就认为这个括号序列是合法的。例如,序列"(())()", "( 阅读全文
posted @ 2017-07-18 11:30 yzm10 阅读(353) 评论(0) 推荐(0) 编辑