07 2017 档案

摘要:QS Network 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 in 阅读全文
posted @ 2017-07-31 21:29 yzm10 阅读(173) 评论(0) 推荐(1)
摘要:HDU Today 经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫妇也退居了二线,并在风景秀美的诸暨市浬浦镇陶姚村买了个房子,开始安度晚年了。 这样住了一段时间,徐总对当地的交通还是不 阅读全文
posted @ 2017-07-31 20:13 yzm10 阅读(169) 评论(0) 推荐(1)
摘要:Til the Cows Come Home Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for 阅读全文
posted @ 2017-07-31 20:03 yzm10 阅读(234) 评论(0) 推荐(1)
摘要:7月30号,ACM集训进行了两周,一切都已on the right way。这时的我适时地从题海中探出头,其实除了刷题,也该写点什么来总结下过去。首先,在第一周里,我学习了数据结构,知道了STL这么一个神奇的存在。不管是stack、queue亦或multiset,还有最具代表的priority_qu 阅读全文
posted @ 2017-07-31 00:07 yzm10 阅读(335) 评论(0) 推荐(1)
摘要:Cleaning Shifts Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one 阅读全文
posted @ 2017-07-30 22:46 yzm10 阅读(160) 评论(0) 推荐(0)
摘要:B. New Skateboard time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Max wants to buy a new 阅读全文
posted @ 2017-07-30 17:12 yzm10 阅读(373) 评论(0) 推荐(0)
摘要:Protecting the Flowers Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7812 Accepted: 3151 Description Farmer John went to cut some wood an 阅读全文
posted @ 2017-07-30 16:48 yzm10 阅读(204) 评论(0) 推荐(0)
摘要:问题 D: 取石子之fans 题目描述 Yougth和Hrdv玩一个游戏,拿出n个石子摆成一圈,Yougth和Hrdv分别从其中取石子,谁先取完者胜,每次可以从中取一个或者相邻两个(注意不是“两个”而是“相邻两个”),Yougth先取,两个人足够聪明,不会拿错。输出胜利者的名字。 Yougth和Hr 阅读全文
posted @ 2017-07-29 23:39 yzm10 阅读(200) 评论(0) 推荐(0)
摘要:问题 G: 素数求和 题目描述 输入一个自然数n,求小于等于n的素数之和 输入 输出 样例输入 样例输出 提示 测试样例保证 2 <= n <= 2,000,000 埃拉托斯特尼筛法(Sieve of Eratosthenes) #include<stdio.h> #include<string.h 阅读全文
posted @ 2017-07-29 23:31 yzm10 阅读(160) 评论(0) 推荐(0)
摘要:问题 D: 蛇形填数 题目描述 在n*n方阵里填入1,2,...,n*n,要求填成蛇形。例如n=4时方阵为:10 11 12 19 16 13 28 15 14 37 6 5 4 输入 直接输入方阵的维数,即n的值。(n<=100) 输出 输出结果是蛇形方阵。 样例输入 样例输出 阅读全文
posted @ 2017-07-29 23:16 yzm10 阅读(286) 评论(0) 推荐(0)
摘要:问题 A: 龟兔赛跑预测 题目描述 输入 输出 样例输入 样例输出 阅读全文
posted @ 2017-07-29 23:06 yzm10 阅读(192) 评论(0) 推荐(0)
摘要:C. Garland time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Once at New Year Dima had a d 阅读全文
posted @ 2017-07-29 22:45 yzm10 阅读(285) 评论(0) 推荐(0)
摘要:哈密顿绕行世界问题 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4844 Accepted Submission(s): 2909 Probl 阅读全文
posted @ 2017-07-28 21:32 yzm10 阅读(302) 评论(0) 推荐(0)
摘要:Find a way Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16184 Accepted Submission(s): 5194 Pro 阅读全文
posted @ 2017-07-28 21:27 yzm10 阅读(1329) 评论(0) 推荐(0)
摘要:棋盘问题 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 47960 Accepted: 23210 Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋 阅读全文
posted @ 2017-07-28 21:14 yzm10 阅读(271) 评论(0) 推荐(0)
摘要:非常可乐 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16071 Accepted Submission(s): 6488 Problem D 阅读全文
posted @ 2017-07-28 20:57 yzm10 阅读(327) 评论(0) 推荐(0)
摘要:C. The Tag Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice got tired of playing the tag 阅读全文
posted @ 2017-07-27 22:48 yzm10 阅读(253) 评论(0) 推荐(1)
摘要:Sudoku Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of t 阅读全文
posted @ 2017-07-27 16:03 yzm10 阅读(223) 评论(0) 推荐(1)
摘要:Description Fat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this 阅读全文
posted @ 2017-07-27 13:36 yzm10 阅读(195) 评论(0) 推荐(1)
摘要:Tempter of the Bone Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Tempter of the Bone Description The doggie found a bone in an 阅读全文
posted @ 2017-07-27 00:18 yzm10 阅读(227) 评论(0) 推荐(0)
摘要:Pots You are given two pots, having the volume of A and B liters respectively. The following operations can be performed: FILL(i) fill the pot i (1 ≤  阅读全文
posted @ 2017-07-26 23:32 yzm10 阅读(650) 评论(0) 推荐(1)
摘要:Prime Path The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four 阅读全文
posted @ 2017-07-26 20:19 yzm10 阅读(214) 评论(0) 推荐(0)
摘要:Dungeon Master You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be fi 阅读全文
posted @ 2017-07-26 16:15 yzm10 阅读(348) 评论(0) 推荐(0)
摘要:Fire! Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. 阅读全文
posted @ 2017-07-26 15:59 yzm10 阅读(269) 评论(0) 推荐(0)
摘要:yzm10,退役OIer,现役ACMer。大学生一枚,从高中开始接触编程(入门pascal...),过程基本自学,蒟蒻一只,在各大比赛划水打酱油。。15年水得noip联二后退役,结束OI之旅。也是在15年暑假末开博。大学开始系统学习c语言,仍放不下对编程的喜爱,尤其是那种A题的感觉~在大一下学期参加 阅读全文
posted @ 2017-07-26 01:40 yzm10 阅读(903) 评论(8) 推荐(3)
摘要:二叉树的先序,中序,后序如何遍历,不在此多说了。直接看题目描述吧(题目摘自九度oj剑指offer面试题6): 输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树。假设输入的前序遍历和中序遍历的结果中都不含重复的数字。例如输入前序遍历序列{1,2,4,7,3,5,6,8}和中序遍历序列{4,7, 阅读全文
posted @ 2017-07-25 23:22 yzm10 阅读(11996) 评论(0) 推荐(0)
摘要:生化危机 发布时间: 2015年10月10日 18:05 时间限制: 1000ms 内存限制: 256M 描述 X博士想造福人类, 研发一种可以再生肢体的药物, 可是很不幸......研究失败了, 他在蜥蜴身上实验的时候, 蜥蜴发生了变异, 更糟糕的是, 蜥蜴逃出了生化实验室. 恐怖的事情发生了, 阅读全文
posted @ 2017-07-25 20:09 yzm10 阅读(360) 评论(0) 推荐(1)
摘要:[cpp] view plain copy print? /* STL中的vector实现邻接表 2014-4-2 08:28:45 */ #include <iostream> #include <vector> #include <cstdlib> #define MAX 10000 using 阅读全文
posted @ 2017-07-25 17:41 yzm10 阅读(466) 评论(0) 推荐(0)
摘要:注册博客园已经老久老久了,现在依然是个老菜鸟。最近开始尝试着写写博客,一来可以督促自己,二来可以回顾自己在过去到底学了些什么。看到很多人的博客都很炫,自己也就开始慢慢摸索。这里把自己摸索的一些经验总结一下。 一、编辑器 1.链接 我们很多时候需要引用别人或自己以前的代码。这里可以很方便的加上链接。 阅读全文
posted @ 2017-07-25 16:41 yzm10 阅读(477) 评论(0) 推荐(0)
摘要:Largest Submatrix of All 1’s Given a m-by-n (0,1)-matrix, of all its submatrices of all 1’s which is the largest? By largest we mean that the submatri 阅读全文
posted @ 2017-07-25 15:40 yzm10 阅读(368) 评论(0) 推荐(1)
摘要:迷宫问题 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能 阅读全文
posted @ 2017-07-24 20:52 yzm10 阅读(1080) 评论(0) 推荐(1)
摘要:Maze Pavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell is either empty, or is a wall. You can go from one cell to another 阅读全文
posted @ 2017-07-24 20:44 yzm10 阅读(406) 评论(1) 推荐(0)
摘要:Prime Ring Problem A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of num 阅读全文
posted @ 2017-07-24 20:30 yzm10 阅读(243) 评论(0) 推荐(0)
摘要:Oil Deposits The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangul 阅读全文
posted @ 2017-07-24 20:15 yzm10 阅读(215) 评论(0) 推荐(0)
摘要:确定比赛名次 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10358 Accepted Submission(s): 4046 Problem 阅读全文
posted @ 2017-07-24 16:32 yzm10 阅读(397) 评论(0) 推荐(0)
摘要:前几天觉得STL中没有树和图真是一种莫大的遗憾啊,但是在网上搜了搜,发现其实可以用容器很简单的构造树。 还是废话少说上代码: 就这么简单就可以构造树的节点。 然后我们可以简单的造一颗树 那么我们可以写个CreateTree来创建 当然构造了树在内存中又看不到,所以还得写个dfs输出。 有了树后添加节 阅读全文
posted @ 2017-07-24 14:38 yzm10 阅读(1743) 评论(0) 推荐(0)
摘要:题目1009:二叉搜索树 从现在开始打算重启刷题征程。程序员的人生不需要解释! 这次撇开poj hoj等难度较大的oj系统,从九度入手(已经很长时间没写过代码了),主要先“叫醒” 沉睡依旧的大脑。唉~真的很长时间没写博客,没写代码了,只能加油吧! 题目如下 时间限制:1 秒 内存限制:32 兆 特殊 阅读全文
posted @ 2017-07-24 11:18 yzm10 阅读(246) 评论(0) 推荐(0)
摘要:yzm10铺瓷砖 一天yzm10接到任务,要求用2×1大小的瓷砖,来铺2×4的地面,地面需要恰好被铺满。这对yzm10来说太容易了,于是他马上设计出了5种不同的铺法(旋转情况算不同种,如图示2、4)。紧接着yzm10便突发奇想,如果要用这种瓷砖来铺2×n的地面,有多少种铺法呢?yzm10给出了n值( 阅读全文
posted @ 2017-07-23 23:37 yzm10 阅读(237) 评论(0) 推荐(0)
摘要:如何统计博客园的个人博客访问量 使用过新浪博客的人都知道,新浪博客的首页有访问量统计功能,迁移到博客园之后发现博客园却没有这项功能,所幸博客园在后台管理的设置选项中有一个公告栏和设置页首页脚代码功能,使用起来非常灵活和方便。借此我们可以通过网络上提过的其他强大的插件来为获取更加详细的访问统计信息(博 阅读全文
posted @ 2017-07-23 22:23 yzm10 阅读(271) 评论(0) 推荐(0)
摘要:Knight Tournament Hooray! Berl II, the king of Berland is making a knight tournament. The king has already sent the message to all knights in the king 阅读全文
posted @ 2017-07-23 21:25 yzm10 阅读(302) 评论(0) 推荐(0)
摘要: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 阅读(246) 评论(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 阅读(424) 评论(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 阅读(270) 评论(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 阅读(294) 评论(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 阅读(240) 评论(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 阅读(288) 评论(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 阅读(178) 评论(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 阅读(215) 评论(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 阅读(376) 评论(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 阅读(314) 评论(1) 推荐(1)
摘要:Count the Sheep Count the Sheep Count the Sheep 题意: 问题描述 输入描述 输出描述 输入样例 输出样例 Hint 第一想法就是直接dfs爆搜,结果还是被hack了。 后来看队友的思路,在这个二分图中,我们枚举每一段男女关系,然后由男的延伸出一个女的, 阅读全文
posted @ 2017-07-20 21:42 yzm10 阅读(190) 评论(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 阅读(567) 评论(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 阅读(325) 评论(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 阅读(237) 评论(0) 推荐(0)
摘要:小希的迷宫 小希的迷宫 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间 阅读全文
posted @ 2017-07-19 13:17 yzm10 阅读(319) 评论(0) 推荐(0)
摘要:分辣条 发布时间: 2016年6月26日 20:36 最后更新: 2016年6月26日 20:37 时间限制: 1000ms 内存限制: 128M 描述 “你喝的酸奶是我买的,辣条也是我买的,你现在要跟我分手,你把我当什么?” “因为你每次分辣条的时候都比我多一根!” 可见分好辣条是一件多么重要的事 阅读全文
posted @ 2017-07-19 00:24 yzm10 阅读(388) 评论(0) 推荐(0)
摘要:1867: 礼上往来 Description 每当节日来临,女友众多的xxx总是能从全国各地的女友那里收到各种礼物。 有礼物收到当然值得高兴,但回礼确是件麻烦的事! 无论多麻烦,总不好意思收礼而不回礼,那也不是xxx的风格。 现在,即爱面子又抠门的xxx想出了一个绝妙的好办法:他准备将各个女友送来的 阅读全文
posted @ 2017-07-18 22:34 yzm10 阅读(185) 评论(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 阅读(307) 评论(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 阅读(162) 评论(0) 推荐(0)
摘要:一道简单的数据结构题 发布时间: 2017年6月3日 18:46 最后更新: 2017年6月3日 18:51 时间限制: 1000ms 内存限制: 128M 描述 如果插入“+”和“1”到一个括号序列,我们能得到一个正确的数学表达式,我们就认为这个括号序列是合法的。例如,序列"(())()", "( 阅读全文
posted @ 2017-07-18 11:30 yzm10 阅读(375) 评论(0) 推荐(0)
摘要:Bad Hair Day Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 13562 Accepted: 4576 Description Some of Farmer John's N cows (1 ≤ N ≤ 80,000) 阅读全文
posted @ 2017-07-17 21:00 yzm10 阅读(182) 评论(0) 推荐(0)
摘要:yzm10铺瓷砖 一天yzm10接到任务,要求用2×1大小的瓷砖,来铺2×4的地面,地面需要恰好被铺满。这对yzm10来说太容易了,于是他马上设计出了5种不同的铺法(旋转情况算不同种,如图示2、4)。紧接着yzm10便突发奇想,如果要用这种瓷砖来铺2×n的地面,有多少种铺法呢?yzm10给出了n值( 阅读全文
posted @ 2017-07-17 19:37 yzm10 阅读(225) 评论(0) 推荐(0)
摘要:某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数 阅读全文
posted @ 2017-07-17 14:51 yzm10 阅读(145) 评论(0) 推荐(0)
摘要:LC的课后辅导 发布时间: 2015年9月19日 21:42 时间限制: 1000ms 内存限制: 256M 描述 有一天,LC给我们出了一道题,如图: 这个图形从左到右由若干个 宽为1 高不确定 的小矩形构成,求出这个图形所包含的最大矩形面积。 输入 多组测试数据 每组测试数据的第一行为n(0 < 阅读全文
posted @ 2017-07-17 13:19 yzm10 阅读(227) 评论(0) 推荐(0)
摘要:Link一个不错的Java组历届题解 时间问题解法: 1.利用Excel 2.Java的Calendar类 3.时间差模板 1.2018蓝桥杯JavaA组2-星期一(利用Excel):https://blog.csdn.net/guanghuichenshao/article/details/797 阅读全文
posted @ 2017-07-16 19:32 yzm10 阅读(328) 评论(0) 推荐(0)
摘要:区间sum 描述 有一个长度为n的正整数序列a1--an,candy想知道任意区间[L,R]的和,你能告诉他吗? 有一个长度为n的正整数序列a1--an,candy想知道任意区间[L,R]的和,你能告诉他吗? 有一个长度为n的正整数序列a1--an,candy想知道任意区间[L,R]的和,你能告诉他 阅读全文
posted @ 2017-07-16 18:31 yzm10 阅读(770) 评论(0) 推荐(0)
摘要:一、康托展开:全排列到一个自然数的双射 X=an*(n-1)!+an-1*(n-2)!+...+ai*(i-1)!+...+a2*1!+a1*0! ai为整数,并且0<=ai<i(1<=i<=n) 适用范围:没有重复元素的全排列 二、全排列的编码: {1,2,3,4,...,n}的排列总共有n!种, 阅读全文
posted @ 2017-07-15 17:07 yzm10 阅读(313) 评论(0) 推荐(0)
摘要:我排第几个 时间限制:1000 ms | 内存限制:65535 KB 难度:3 我排第几个 时间限制:1000 ms | 内存限制:65535 KB 难度:3 现在有"abcdefghijkl”12个字符,将其所有的排列中按字典序排列,给出任意一种排列,说出这个排列在所有的排列中是第几小的? A B 阅读全文
posted @ 2017-07-15 17:04 yzm10 阅读(239) 评论(0) 推荐(1)
摘要:背包之01背包、完全背包、多重背包详解 PS:大家觉得写得还过得去,就帮我顶博客,谢谢。 首先说下动态规划,动态规划这东西就和递归一样,只能找局部关系,若想全部列出来,是很难的,比如汉诺塔。你可以说先把除最后一层的其他所有层都移动到2,再把最后一层移动到3,最后再把其余的从2移动到3,这是一个直观的 阅读全文
posted @ 2017-07-13 19:18 yzm10 阅读(434) 评论(0) 推荐(0)