随笔分类 -  ACM---模拟

摘要:问题描述给定长度为n的序列a,求有多少对i,j(i 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include10 #include11 #include12 #include13 #include14 #... 阅读全文
posted @ 2015-11-21 21:25 UniqueColor 阅读(257) 评论(0) 推荐(0)
摘要:Problem DescriptionLadies and gentlemen, please sit up straight.Don't tilt your head. I'm serious.For n given strings S1,S2,⋯,Sn, labelled from 1 to n... 阅读全文
posted @ 2015-11-20 23:09 UniqueColor 阅读(232) 评论(0) 推荐(0)
摘要:Problem DescriptionWe are all familiar with sorting algorithms: quick sort, merge sort, heap sort, insertion sort, selection sort, bubble sort, etc. B... 阅读全文
posted @ 2015-11-19 15:24 UniqueColor 阅读(414) 评论(0) 推荐(0)
摘要:问题描述给出N个整数。你要选择至少一个数,使得你选的数的乘积最大。保证任意选一些数相乘的绝对值都不会大于263−12^{63}-12​63​​−1。输入描述第一行读入一个数TTT表示数据组数。对于每组数据:第一行是一个数NNN,第二行是NNN个整数。1≤T≤10001 \leq T \leq 100... 阅读全文
posted @ 2015-10-29 19:08 UniqueColor 阅读(237) 评论(0) 推荐(0)
摘要:Problem DescriptionLet L denote the number of 1s in integer D’s binary representation. Given two integers S1 and S2, we call D a WYH number if S1≤L≤S2... 阅读全文
posted @ 2015-10-01 18:45 UniqueColor 阅读(348) 评论(0) 推荐(0)
摘要:Problem DescriptionIn an n∗m maze, the right-bottom corner is the exit (position (n,m) is the exit). In every position of this maze, there is either a... 阅读全文
posted @ 2015-09-11 11:26 UniqueColor 阅读(244) 评论(0) 推荐(0)
摘要:Problem DescriptionFor 2 non-negative integers x and y, f(x, y) is defined as the number of different bits in the binary format of x and y. For exampl... 阅读全文
posted @ 2015-09-10 21:13 UniqueColor 阅读(281) 评论(0) 推荐(0)
摘要:Problem DescriptionToday is the 1st anniversary of BestCoder. Soda, the contest manager, gets a string s of length n. He wants to find three nonoverla... 阅读全文
posted @ 2015-09-10 20:19 UniqueColor 阅读(214) 评论(0) 推荐(0)
摘要:Problem DescriptionRecently, Dave is boring, so he often walks around. He finds that some places are too crowded, for example, the ground. He couldn't... 阅读全文
posted @ 2015-09-10 18:37 UniqueColor 阅读(252) 评论(0) 推荐(0)
摘要:Problem DescriptionThere are many people's name and birth in a list.Your task is to print the name from young to old.(There is no pair of two has the ... 阅读全文
posted @ 2015-09-06 10:09 UniqueColor 阅读(472) 评论(0) 推荐(0)
摘要:DescriptionFarmer John's N (1 =w1-s2,即w2+s2>=w1+s1,所以和最大的就该老实的在下面呆着= =! 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using name... 阅读全文
posted @ 2015-09-04 18:42 UniqueColor 阅读(252) 评论(0) 推荐(0)
摘要:Problem Description Coach Pang and Uncle Yang both love numbers. Every morning they play a game with number together. In each game the following will... 阅读全文
posted @ 2015-08-27 18:44 UniqueColor 阅读(257) 评论(0) 推荐(0)
摘要:Problem DescriptionA sequence b1,b2,⋯,bn are called (d1,d2)-arithmetic sequence if and only if there exist i(1≤i≤n) such that for every j(1≤j 2 #inclu... 阅读全文
posted @ 2015-08-18 20:00 UniqueColor 阅读(265) 评论(0) 推荐(0)
摘要:Problem DescriptionTeacher Mai is in a maze with n rows and m columns. There is a non-negative number in each cell. Teacher Mai wants to walk from the... 阅读全文
posted @ 2015-08-18 19:52 UniqueColor 阅读(323) 评论(0) 推荐(0)
摘要:问题描述Tina Town 是一个善良友好的地方,这里的每一个人都互相关心。Tina有一个球,它的名字叫zball。zball很神奇,它会每天变大。在第一天的时候,它会变大11倍。在第二天的时候,它会变大22倍。在第nn天的时候,它会变大nn倍。zball原来的体积是11。Tina想知道,zball... 阅读全文
posted @ 2015-08-16 00:36 UniqueColor 阅读(466) 评论(0) 推荐(0)