随笔分类 -  acm

各种题目的题解
摘要:102. Coprimestime limit per test: 0.25 sec.memory limit per test: 4096 KBFor given integer N (1<=N<=104) find amount of positive numbers not greater t... 阅读全文
posted @ 2015-03-26 14:49 一个大叔 阅读(119) 评论(0) 推荐(0)
摘要:Time Limit:1000MSMemory Limit:10000KTotal Submissions:48916Accepted:18476DescriptionThe Joseph's problem is notoriously known. For those who are not f... 阅读全文
posted @ 2015-02-01 23:09 一个大叔 阅读(301) 评论(0) 推荐(0)
摘要:MedianTime Limit:1000MSMemory Limit:65536KTotal Submissions:3882Accepted:1139DescriptionGivenNnumbers,X1,X2, ... ,XN, let us calculate the difference ... 阅读全文
posted @ 2014-10-08 00:17 一个大叔 阅读(1349) 评论(1) 推荐(0)
摘要:Big Christmas TreeTime Limit:3000MSMemory Limit:131072KTotal Submissions:20974Accepted:4535DescriptionChristmas is coming to KCM city. Suby the loyal ... 阅读全文
posted @ 2014-10-07 17:20 一个大叔 阅读(186) 评论(0) 推荐(0)
摘要:HotelTime Limit:10000MSMemory Limit:65536KTotal Submissions:859Accepted:280DescriptionZebel, the tour coordinator, has reserved a limited number of ho... 阅读全文
posted @ 2014-10-06 17:03 一个大叔 阅读(326) 评论(0) 推荐(0)
摘要:GCD XORGiven an integer N, nd how many pairs (A; B) are there such that: gcd(A; B) = A xor B where1  B  A  N.Here gcd(A; B) means the greatest com... 阅读全文
posted @ 2014-10-05 22:42 一个大叔 阅读(166) 评论(0) 推荐(0)
摘要:Conquer a New RegionTime Limit:5 Seconds Memory Limit:32768 KBThe wheel of the history rolling forward, our king conquered a new region in a distant c... 阅读全文
posted @ 2014-10-05 20:25 一个大叔 阅读(175) 评论(0) 推荐(0)
摘要:Time Limit:1000MSMemory Limit:10000KTotal Submissions:11433Accepted:4551DescriptionA number of schools are connected to a computer network. Agreements... 阅读全文
posted @ 2014-10-01 17:26 一个大叔 阅读(447) 评论(0) 推荐(1)
摘要:InstrusiveTime Limit: 3000/1500 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 596Accepted Submission(s): 190Problem ... 阅读全文
posted @ 2014-09-23 15:47 一个大叔 阅读(280) 评论(0) 推荐(0)
摘要:D. Increase Sequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPeter has a sequence of integ... 阅读全文
posted @ 2014-09-20 10:57 一个大叔 阅读(549) 评论(0) 推荐(1)
摘要:Arranging Your TeamTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1218Accepted Submission(s): 360... 阅读全文
posted @ 2014-08-30 00:58 一个大叔 阅读(287) 评论(0) 推荐(0)
摘要:Problem DescriptionUnlike single maze, double maze requires a common sequence of commands to solve both mazes. See the figure below for a quick unders... 阅读全文
posted @ 2014-08-30 00:54 一个大叔 阅读(354) 评论(0) 推荐(0)
摘要:DartsTime Limit:1000MSMemory Limit:65536KTotal Submissions:58Accepted:32Special JudgeDescriptionAfter a long week of work at the ICPC Headquarters, Bi... 阅读全文
posted @ 2014-08-24 00:17 一个大叔 阅读(312) 评论(0) 推荐(0)
摘要:DescriptionYou have an arraya[1], a[2], ..., a[n], containing distinct integers from1ton. Your task is to sort this array in increasing order with the... 阅读全文
posted @ 2014-07-26 12:30 一个大叔 阅读(431) 评论(0) 推荐(0)
摘要:DescriptionThere is a number of disjoint vertical line segments in the plane. We say that two segments are horizontally visible if they can be connect... 阅读全文
posted @ 2014-07-19 23:34 一个大叔 阅读(700) 评论(0) 推荐(0)
摘要:DescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each ... 阅读全文
posted @ 2014-07-18 14:42 一个大叔 阅读(155) 评论(0) 推荐(0)
摘要:DescriptionRailway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year ... 阅读全文
posted @ 2014-07-18 14:40 一个大叔 阅读(209) 评论(0) 推荐(0)
摘要:一。從命令到編輯模式a :当前单词后面插入Appendi :当前位置插入Inserto :当前行下新开一行插入Open new lineA :当前行尾插入AppendI :当前行首插入InsertO :当前行上新开一行插入Open new line比較常用就是i,a,o,I,A,O了,將來多試幾次就... 阅读全文
posted @ 2014-07-15 14:20 一个大叔 阅读(217) 评论(0) 推荐(0)
摘要:DescriptionYou are given a sequence ofnintegersa1, a2, ... , anin non-decreasing order. In addition to that, you are given several queries consisting ... 阅读全文
posted @ 2014-07-14 22:14 一个大叔 阅读(139) 评论(0) 推荐(0)
摘要:DescriptionN(3 7 #include 8 #include 9 using namespace std;10 11 #define maxv 10000512 #define maxn 2000513 typedef long long LL;14 15 int c[maxv],n,v... 阅读全文
posted @ 2014-07-14 20:11 一个大叔 阅读(233) 评论(0) 推荐(0)