08 2017 档案

摘要:在刷题中遇到的许多低级、隐蔽而又致命的错误,在此整理,谨此改正。 1.库函数的使用: 之前做过许多题,一直没有发现这个致命错误,导致许多题目低效率通过(最坏甚至不能AC)。 如strlen(s)函数计算字符串长度,其本身就含有O(n)复杂度,在做许多题目时,为了方便我直接把函数放在for循环里用,就 阅读全文
posted @ 2017-08-21 00:05 yzm10 阅读(303) 评论(1) 推荐(1)
摘要:河老师的新年礼物 发布时间: 2017年1月1日 15:11 最后更新: 2017年1月1日 15:13 时间限制: 1000ms 内存限制: 256M 描述 河老师的新年礼物是一个长度为n的ab串,他想要找出最长的一个子串使得这个子串中每个字符都相等,他称之为“最优子串”。当然对河老师来说这个问题 阅读全文
posted @ 2017-08-18 23:58 yzm10 阅读(341) 评论(0) 推荐(0)
摘要:Piggy-Bank Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes f 阅读全文
posted @ 2017-08-17 22:31 yzm10 阅读(543) 评论(0) 推荐(1)
摘要:ycb的ACM进阶之路 发布时间: 2017年5月22日 14:30 最后更新: 2017年5月22日 14:31 时间限制: 1000ms 内存限制: 128M 描述 ycb是个天资聪颖的孩子,他的梦想是成为世界上最伟大的ACMer。为此,他想拜附近最有威望的dalao为师。dalao为了判断他的 阅读全文
posted @ 2017-08-15 23:34 yzm10 阅读(299) 评论(0) 推荐(0)
摘要:免费馅饼 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在 阅读全文
posted @ 2017-08-15 22:24 yzm10 阅读(160) 评论(0) 推荐(0)
摘要:命运 穿过幽谷意味着离大魔王lemon已经无限接近了! 可谁能想到,yifenfei在斩杀了一些虾兵蟹将后,却再次面临命运大迷宫的考验,这是魔王lemon设下的又一个机关。要知道,不论何人,若在迷宫中被困1小时以上,则必死无疑! 可怜的yifenfei为了去救MM,义无返顾地跳进了迷宫。让我们一起帮 阅读全文
posted @ 2017-08-15 22:10 yzm10 阅读(274) 评论(0) 推荐(0)
摘要:Common Subsequence A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, 阅读全文
posted @ 2017-08-15 21:21 yzm10 阅读(221) 评论(0) 推荐(0)
摘要:B - Big Event in HDU Nowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don't know that Computer College had 阅读全文
posted @ 2017-08-14 12:58 yzm10 阅读(408) 评论(0) 推荐(1)
摘要:饭卡 问题描述 : 问题描述 : 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买 阅读全文
posted @ 2017-08-14 10:54 yzm10 阅读(133) 评论(0) 推荐(0)
摘要:yzm10与战地信使 M国与R国正进行着激烈的鏖战,此时的yzm10从R国窃取了最高军事机密,这份情报将是此次战役的转折点,如果M国得到了这份情报,就能够取得这次战争的胜利。yzm10当然是站在M国这边的,他想用最快的速度将这份情报交到M国国王手中,在这之前需要有M国战地信使的帮助,情报将在信使之间 阅读全文
posted @ 2017-08-13 21:55 yzm10 阅读(255) 评论(0) 推荐(1)
摘要:Chess Accepts: 1805 Submissions: 5738 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Chess Accepts: 1805 Submissions 阅读全文
posted @ 2017-08-13 18:21 yzm10 阅读(264) 评论(0) 推荐(0)
摘要:度度熊的01世界 Accepts: 967 Submissions: 3064 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) 度度熊的01世界 Accepts: 967 Submiss 阅读全文
posted @ 2017-08-12 17:42 yzm10 阅读(266) 评论(0) 推荐(1)
摘要:今夕何夕 Accepts: 1345 Submissions: 5533 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) 今夕何夕 Accepts: 1345 Submissions: 阅读全文
posted @ 2017-08-12 17:27 yzm10 阅读(339) 评论(0) 推荐(1)
摘要:Sort it You want to processe a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in ascending or 阅读全文
posted @ 2017-08-11 15:49 yzm10 阅读(342) 评论(0) 推荐(1)
摘要:Mr. Kitayuta's Colorful Graph Mr. Kitayuta has just bought an undirected graph consisting of n vertices and medges. The vertices of the graph are numb 阅读全文
posted @ 2017-08-11 15:29 yzm10 阅读(297) 评论(0) 推荐(1)
摘要:Color the ball N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几 阅读全文
posted @ 2017-08-08 20:36 yzm10 阅读(208) 评论(0) 推荐(1)
摘要:敌兵布阵 C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都 阅读全文
posted @ 2017-08-08 20:02 yzm10 阅读(138) 评论(0) 推荐(0)
摘要:转自http://www.cnblogs.com/TheRoadToTheGold/p/6254255.html 数据结构——线段树 O、引例 A.给出n个数,n<=100,和m个询问,每次询问区间[l,r]的和,并输出。 一种回答:这也太简单了,O(n)枚举搜索就行了。 另一种回答:还用得着o(n 阅读全文
posted @ 2017-08-07 23:25 yzm10 阅读(227) 评论(0) 推荐(1)
摘要:度度熊的王国战略 Accepts: 644 Submissions: 5880 Time Limit: 40000/20000 MS (Java/Others) Memory Limit: 32768/132768 K (Java/Others) Accepts: 644 Submissions: 阅读全文
posted @ 2017-08-07 00:07 yzm10 阅读(385) 评论(0) 推荐(1)
摘要:六度分离 1967年,美国著名的社会学家斯坦利·米尔格兰姆提出了一个名为“小世界现象(small world phenomenon)”的著名假说,大意是说,任何2个素不相识的人中间最多只隔着6个人,即只用6个人就可以将他们联系在一起,因此他的理论也被称为“六度分离”理论(six degrees of 阅读全文
posted @ 2017-08-06 23:08 yzm10 阅读(180) 评论(0) 推荐(0)
摘要:天气晴朗的魔法 这样阴沉的天气持续下去,我们不免担心起他的健康。 51nod魔法学校近日开展了主题为“天气晴朗”的魔法交流活动。 N名魔法师按阵法站好,之后选取N - 1条魔法链将所有魔法师的魔力连接起来,形成一个魔法阵。 魔法链是做法成功与否的关键。每一条魔法链都有一个魔力值V,魔法最终的效果取决 阅读全文
posted @ 2017-08-06 23:00 yzm10 阅读(223) 评论(0) 推荐(0)
摘要:Invitation Cards In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They 阅读全文
posted @ 2017-08-04 18:08 yzm10 阅读(173) 评论(0) 推荐(0)
摘要:Flight Recently, Shua Shua had a big quarrel with his GF. He is so upset that he decides to take a trip to some other city to avoid meeting her. He wi 阅读全文
posted @ 2017-08-04 17:56 yzm10 阅读(236) 评论(0) 推荐(0)
摘要:Trucking A certain local trucking company would like to transport some goods on a cargo truck from one place to another. It is desirable to transport 阅读全文
posted @ 2017-08-03 16:26 yzm10 阅读(179) 评论(0) 推荐(1)
摘要:Idiomatic Phrases Game Tom is playing a game called Idiomatic Phrases Game. An idiom consists of several Chinese characters and has a certain meaning. 阅读全文
posted @ 2017-08-03 15:17 yzm10 阅读(252) 评论(0) 推荐(1)
摘要:Arctic Network The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication 阅读全文
posted @ 2017-08-03 14:58 yzm10 阅读(206) 评论(0) 推荐(1)
摘要:Bad Cowtractors Bessie has been hired to build a cheap internet network among Farmer John's N (2 <= N <= 1,000) barns that are conveniently numbered 1 阅读全文
posted @ 2017-08-02 22:43 yzm10 阅读(226) 评论(0) 推荐(1)
摘要:Silver Cow Party One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 阅读全文
posted @ 2017-08-02 14:56 yzm10 阅读(229) 评论(0) 推荐(1)
摘要:Skiing Skiing Bessie and the rest of Farmer John's cows are taking a trip this winter to go skiing. One day Bessie finds herself at the top left corne 阅读全文
posted @ 2017-08-01 21:18 yzm10 阅读(236) 评论(0) 推荐(0)
摘要:MPI Maelstrom BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hiera 阅读全文
posted @ 2017-08-01 20:37 yzm10 阅读(205) 评论(0) 推荐(0)
摘要:Building a Space Station You are a member of the space station engineering team, and are assigned a task in the construction process of the station. Y 阅读全文
posted @ 2017-08-01 20:34 yzm10 阅读(180) 评论(0) 推荐(0)
摘要:粗略讲讲SPFA算法的原理,SPFA算法是1994年西南交通大学段凡丁提出 是一种求单源最短路的算法 算法中需要用到的主要变量 int n; //表示n个点,从1到n标号 int s,t; //s为源点,t为终点 int d[N]; //d[i]表示源点s到点i的最短路 int p[N]; //记录 阅读全文
posted @ 2017-08-01 00:57 yzm10 阅读(370) 评论(0) 推荐(1)
摘要:Jungle Roads The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages 阅读全文
posted @ 2017-08-01 00:17 yzm10 阅读(175) 评论(0) 推荐(1)