不会做
文章平均质量分 81
RJ28
小学生
展开
-
Codeforces Round #614 (Div. 1) D. Chaotic V.
"Everything has been planned out. No more hidden concerns. The condition of Cytus is also perfect.The time right now… 00:01:12…It’s time."The emotion samples are now sufficient. After almost 3 year...原创 2020-01-28 19:34:45 · 323 阅读 · 0 评论 -
Gym 100917 J. Judgement
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe jury of Berland regional olympiad in informatics does not trust to con原创 2016-03-29 13:20:24 · 718 阅读 · 0 评论 -
POJ-2151 Check the difficulty of problems
Time Limit: 2000MS Memory Limit: 65536KTotal Submissions: 6332 Accepted: 2756DescriptionOrganizing a programming contest is not an easy job. To avoid making the problems too di原创 2016-04-03 20:45:06 · 283 阅读 · 0 评论 -
POJ-3373 (DP)
Time Limit: 3000MS Memory Limit: 65536KTotal Submissions: 3240 Accepted: 1055DescriptionGiven two positive integers n and k, you are asked to generate a new integer, say m,原创 2016-04-12 20:30:14 · 803 阅读 · 0 评论 -
Uva 11134 Fabled Rooks
链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=2075题目大意:在一个n*n的棋盘上放置n个车,使得它们之间都不能互相攻击(任意两个车都不能同行或同列),并且,对于第i个车,限制它只能放在一个矩形区域内,(xl原创 2016-04-28 00:33:46 · 356 阅读 · 0 评论 -
LA 4094 Wonder Team
The Brasileiro League is the most important event in Brazil. There aren football teams participating in the competitions, each team plays twice (home and away) against each other team. Each team rec原创 2016-05-03 15:28:02 · 885 阅读 · 0 评论 -
Codeforces Round #347 (Div. 1) B. International Olympiad
International Abbreviation Olympiad takes place annually starting from 1989. Each year the competition receives an abbreviation of formIAO'y, where y stands for some number of consequent last digits原创 2016-05-14 17:16:16 · 317 阅读 · 0 评论 -
Fzu-2190 非提的救赎 (单调栈)
Problem Description正如你所知道从前有一个人叫s_sin,她拥有着坐拥三千舰狼的梦想!然而天不遂人愿当她踏进hentai collection的大门之后,现实让她领略到了无情。身为一个坚强的妹子,她知道即使出门大破,即使十一连抽全是R,也要坚信着“玄不救非,氪不改命”,而自己是一个欧白这样最初的信仰!有一天s_sin率领着她的舰狼们到达了某海峡,以一个N*M的原创 2016-05-04 17:12:35 · 662 阅读 · 0 评论 -
CodeForces 629C Famil Door and Brackets
As Famil Door’s birthday is coming, some of his friends (like Gabi) decided to buy a present for him. His friends are going to buy a string consisted of round brackets since Famil Door loves string of原创 2016-05-15 18:05:46 · 370 阅读 · 0 评论 -
Hdu-5301 Buildings(思维题)
Problem DescriptionYour current task is to make a ground plan for a residential building located in HZXJHS. So you must determine a way to split the floor building with walls to make apartments in t原创 2016-05-29 10:44:49 · 443 阅读 · 0 评论 -
Codeforces Round #353 (Div. 2) C. Money Transfers
There are n banks in the city where Vasya lives, they are located in a circle, such that any two banks are neighbouring if their indices differ by no more than1. Also, bank 1 and bankn are neighbo原创 2016-05-17 16:22:14 · 597 阅读 · 0 评论 -
Codeforces Round #353 (Div. 2) D. Tree Construction
During the programming classes Vasya was assigned a difficult problem. However, he doesn't know how to code and was unable to find the solution in the Internet, so he asks you to help.You are given原创 2016-05-17 17:16:30 · 699 阅读 · 0 评论 -
Hdu-5335 Walk Out (BFS+贪心)
Problem DescriptionIn an n∗mmaze(迷失), the right-bottom corner is the exit (position(n,m) is the exit). In every position of this maze, there is either a 0 or a 1 written on it.An exp原创 2016-05-30 17:04:56 · 411 阅读 · 0 评论 -
Codeforces Round #353 (Div. 2) E. Trains and Statistic
Vasya commutes by train every day. There are n train stations in the city, and at thei-th station it's possible to buy only tickets to stations fromi + 1 to ai inclusive. No tickets are sold at th原创 2016-05-31 16:02:11 · 472 阅读 · 0 评论 -
LA 4394 String painter
There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the help of the painter, you can change a segment of chara原创 2016-06-01 14:59:48 · 789 阅读 · 0 评论 -
Codeforces Round #189 (Div. 1) B. Psychos in a Line
There are n psychos standing in a line. Eachpsycho(心理分析) isassigned(分配) aunique(独特的)integer(整数) from1 to n. At each step every psycho who has an id greater than the psycho to his right (if e原创 2016-05-20 15:38:57 · 688 阅读 · 0 评论 -
Educational Codeforces Round 12 E. Beautiful Subarrays
One day, ZS the Coder wrote down an array of integers a with elementsa1, a2, ..., an.A subarray of the array a is a sequenceal, al + 1, ..., ar for some integers(l, r) such that 1原创 2016-05-21 22:31:39 · 559 阅读 · 0 评论 -
Codeforces Round #352 (Div. 1) B. Robin Hood
We all know the impressive story of Robin Hood. Robin Hood uses his archery skills and his wits to steal the money from rich, and return it to the poor.There are n citizens in Kekoland, each person原创 2016-05-12 23:29:35 · 568 阅读 · 0 评论 -
LA 4253 Archery (二分)
Korea's reputation in archery is well known because the Korean archery teams have been sweeping almost all gold, silver, and bronze medals in the Olympic Games.An archery game ICPC supported by NE原创 2016-05-05 08:23:49 · 1255 阅读 · 0 评论 -
LA 4490 Help Bubu (状压DP)
题意:给出n和k,表示说书架上有n本书,可以取出k次书,每次取出后可以任意放回书架中,书的编号为25~32八种,定义该书架的混乱程度为片段的个数。求出最小的混乱度。原创 2016-06-10 20:07:53 · 1225 阅读 · 0 评论 -
Codeforces Round #355 (Div. 2) D. Vanya and Treasure
Vanya is in the palace that can be represented as a grid n × m. Each room contains a single chest, an the room located in thei-th row and j-th columns contains the chest of typeaij. Each chest o原创 2016-06-05 21:31:42 · 677 阅读 · 0 评论 -
Hdu-5739 Fantasia (图论点双连通分量+DP)
Problem DescriptionProfessor Zhang has an undirected graph G with n vertices and m edges. Each vertex is attached with a weight wi. Let Gi be the graph after deleting the i-th vertex f原创 2016-07-23 22:58:36 · 617 阅读 · 0 评论 -
LA 4015 Cave,Chengdu 2007.
题意:一棵n个结点的有根树,树的边有正整数权,表示两个结点之间的距离。你的任务是回答这样的询问:从根结点处罚,走不超过x单位距离,最多经过多少个结点?同一个结点经过最多算一次。分析:设dp[x][j][0]表示以x为根的树经过i个点且回来的最小费用,dp[x][j][1]表示不会来的最小费用。 则有: dp[x][j][0] = min(dp[x][j原创 2016-06-02 13:53:16 · 528 阅读 · 0 评论 -
POJ-2949 Word Rings(SPFA DFS实现 + 环上平均权值最大)
DescriptionA word ring is a sequence of words where the last two letters of each word are the same as the first two letters of the next word (and the last two letters of the last word are the same a原创 2016-06-20 09:44:53 · 1364 阅读 · 0 评论 -
Codeforces Round #361 (Div. 2) E. Mike and Geometry Problem (离散化)
Mike wants to prepare for IMO but he doesn't know geometry, so his teacher gave him an interesting geometry problem. Let's definef([l, r]) = r - l + 1 to be the number of integer points in the segme原创 2016-07-19 10:21:49 · 700 阅读 · 0 评论 -
LA 4850 Installations (贪心)
Description In the morning, service engineers in a telecom company receive a list of jobs which they must serve today. They install telephones, internet, ipTVs, etc and repair troubles with establ原创 2016-04-29 20:17:51 · 2096 阅读 · 0 评论 -
Hdu-5773 The All-purpose Zero(LIS变形)
Problem Description?? gets an sequence S with n intergers(0 < n <= 100000,0<= S[i] <= 1000000).?? has a magic so that he can change 0 to any interger(He does not need to change all 0 to the same int原创 2016-07-29 13:29:35 · 312 阅读 · 0 评论 -
Hdu-5726 GCD (二分 + RMQ)
Problem DescriptionGive you a sequence of N(N≤100,000) integers : a1,...,an(0ai≤1000,000,000). There are Q(Q≤100,000) queries. For each query l,r you have to calculate gcd(al,,al+1,...,ar)原创 2016-07-20 21:33:48 · 656 阅读 · 0 评论 -
Ural 2038 Minimum Vertex Cover(二分图最小顶点覆盖+快速读入)
题意:给你一个二分图,让你把二分图中的点划分为三个集合:一定在最小顶点覆盖集中,一定不在,可能在。分析:若一个匹配点和一个未匹配点之间有边,那这个匹配点一定在最小顶点覆盖集中,它的另一个匹配点一定不再其中,一个一定不再其中的点连向的所有点都一定给在最小顶点覆盖集中,我们可以就这样DFS一遍求出所有结果。#include#include#include#include#inc原创 2016-08-07 20:14:57 · 760 阅读 · 2 评论 -
Codeforces Round #365 (Div. 2) D. Mishka and Interesting sum
Little Mishka enjoys programming. Since her birthday has just passed, her friends decided to present her with array of non-negative integersa1, a2, ..., an ofn elements!Mishka loved the array an原创 2016-08-05 23:00:52 · 288 阅读 · 0 评论 -
Hdu-5781 ATM Mechine(DP)
Problem DescriptionAlice is going to take all her savings out of the ATM(Automatic Teller Machine). Alice forget how many deposit she has, and this strange ATM doesn't support query deposit. The onl原创 2016-08-02 22:34:22 · 330 阅读 · 0 评论 -
UVALive 7416 Bringing Order to Disorder(搜索)
题意:给你一个n位”数“(前导0也算数字),问小于它的数字有多少,其中小于号重载为:1.a各个位上的数字和小于b.2.1相等的前提下a各个位上的数字+1相乘小于b.3.1,2相等的前提下a的十进制意义小于b。分析:原创 2016-08-28 00:27:50 · 585 阅读 · 0 评论 -
LA 3514 The Ministers' Major Mess(2-SAT)
题意: n 个人对m个方案投票 。 每个人最多对4个方案投票, 问是否存在一种决定 , 使每个人都有超过一半的建议被采用 。 且哪些方案的态度是确定的。分析:投票数#include#include#include#include#include#include#include#include#include#include#include#inc原创 2016-08-07 02:36:21 · 578 阅读 · 0 评论 -
Codeforces Round #364 (Div. 1) B. Connecting Universities(图论)
Treeland is a country in which there are n towns connected byn - 1 two-way road such that it's possible to get from any town to any other town.In Treeland there are 2k universities which are loc原创 2016-09-10 01:22:49 · 287 阅读 · 0 评论 -
Uva 10972 RevolC FaeLoN(边双连通分量)
题意:给定一个无向图,要求把所有的无向边改成有向边,并且添加最少的有向边使得新图强连通。分析:原创 2016-08-09 10:55:02 · 384 阅读 · 0 评论 -
Gym 100801G Graph(贪心构造)
题意:给n个点m条边的DAG,最多可以添加k条边,问添加后的图的最小拓扑序的最大值是多少。分析:开两个set,一个维护当前入度为0的所有点,一个用来维护需要被加边的点,然后对于第一个set中值最小的点,如果set中还有其他点且k还没用完,那么我们便直接把它扔进第二个set中待处理,否则直接将其打印出;如果第一个set中只有这一个点,我们便考虑能不能从第二个set中找一个最大的点原创 2016-08-29 21:28:21 · 644 阅读 · 0 评论 -
Codeforces Round #370 (Div. 2) D. Memory and Scores(DP)
Memory and his friend Lexa are competing to get higher score in one popular computer game. Memory starts with scorea and Lexa starts with score b. In a single turn, both Memory and Lexa get some i原创 2016-09-11 23:12:13 · 306 阅读 · 0 评论 -
Codeforces Round #364 (Div. 1) C. Break Up (桥)
Again, there are hard times in Berland! Many towns have such tensions that even civil war is possible.There are n towns in Reberland, some pairs of which connected by two-way roads. It is not guar原创 2016-09-12 01:38:46 · 378 阅读 · 0 评论 -
Hdu-5816 Hearthstone(状态压缩DP)
Problem DescriptionHearthstone is an online collectible card game from Blizzard Entertainment. Strategies and luck are the most important factors in this game. When you suffer a desperate situation原创 2016-08-09 22:37:56 · 568 阅读 · 2 评论 -
LA 7339 Owllen(贪心)
题意:给定一个长度为n的字符串(26个小写字母),让你再构造一个长度为n的字符串,使得两串的LCS最小。分析:选原串中出现次数最少的字母构造就可以了,可以证明这样一定是LCS最小。#include#include#include#include#include#include#include#include#include#include#include原创 2016-08-22 14:24:03 · 349 阅读 · 0 评论