http://blog.csdn.net/queuelovestack/article/details/53055418

下午重现了一下大连赛区的比赛,感觉有点神奇,重现时居然改了现场赛的数据范围,原本过的人数比较多的题结果重现过的变少了,而原本现场赛全场过的人最少的题重现做出的人反而多了一堆,不过还是不影响最水的6题,然而残酷的现实是6题才有机会拿铜...(╥╯^╰╥)

链接→2016ACM/ICPC亚洲区大连站-重现赛

 Problem 1001 Wrestling Match

Accept: 0    Submit: 0
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)

 Problem Description

Nowadays, at least one wrestling match is held every year in our country. There are a lot of people in the game is "good player”, the rest is "bad player”. Now, Xiao Ming is referee of the wrestling match and he has a list of the matches in his hand. At the same time, he knows some people are good players,some are bad players. He believes that every game is a battle between the good and the bad player. Now he wants to know whether all the people can be divided into "good player" and "bad player".

 Input

Input contains multiple sets of data.For each set of data,there are four numbers in the first line:N (1 ≤ N≤ 1000)、M(1 ≤M ≤ 10000)、X,Y(X+Y≤N ),in order to show the number of players(numbered 1toN ),the number of matches,the number of known "good players" and the number of known "bad players".In the next M lines,Each line has two numbersa, b(a≠b) ,said there is a game between a and b .The next line has X different numbers.Each number is known as a "good player" number.The last line contains Y different numbers.Each number represents a known "bad player" number.Data guarantees there will not be a player number is a good player and also a bad player.

 Output

If all the people can be divided into "good players" and "bad players”, output "YES", otherwise output "NO".

 Sample Input

5 4 0 0
1 3
1 4
3 5
4 5
5 4 1 0
1 3
1 4
3 5
4 5
2

 Sample Output

NO
YES

 Problem Idea

解题思路:

【题意】

这个题目意思,感觉还是存疑的( ̄へ ̄),我只能以本人过了此题的想法来解释

N个选手,M场摔跤比赛,已知N个选手中有X个选手是"good player",Y个选手是"bad player"

问是否可以将N个选手划分成"good player"和"bad player"两个阵营,使得每场摔跤比赛的两位选手必定是一位来自"good player",一位来自"bad player"

【类型】
搜索(bfs or dfs)
【分析】

有挺多人要求解释样例的,因为不太明白为啥不告诉2是哪一个阵营就无法划分阵营了?明明(1,5)和(3,4)也不知道是哪一阵营

但是,我们可以这样理解一下,即便我不知道(1,5)是属于"good player"阵营还是属于"bad player"阵营,他们只能属于一种阵营

而2是没有告诉你和其他选手的关系,那么2可以同属于两个阵营,显然这与题目要求" there will not be a player number is a good player and also a bad player"不符

好了,接下来讲做法,首先考虑已经告诉你是哪个阵营的选手A,那么和A选手比赛的选手B必定对立阵营的,若选手B和选手A是同一阵营,那显然是无法继续划分的,bfs or dfs一下,将已知阵营的选手确定

然后开始处理未知阵营但有比赛的选手,我们完全可以假设其中一方为"good player",那么另一方就是"bad player",接着还是bfs or dfs判断

处理完之后,再遍历一遍每个选手,看是否还有未知阵营的选手存在即可

重现的时候被自己蠢哭了,(ಥ _ ಥ),因为每输入一个已知阵营的选手,我都会去搜索判一次,然后遇到冲突就break了,导致题目还没有完全输入就被我结束了,于是WA了好几发,心疼自己

【时间复杂度&&优化】
O(n)

题目链接→HDU 5971 Wrestling Match

 Source Code

  1. /*Sherlock and Watson and Adler*/
  2. #pragma comment(linker, "/STACK:1024000000,1024000000")
  3. #include<stdio.h>
  4. #include<string.h>
  5. #include<stdlib.h>
  6. #include<queue>
  7. #include<stack>
  8. #include<math.h>
  9. #include<vector>
  10. #include<map>
  11. #include<set>
  12. #include<list>
  13. #include<bitset>
  14. #include<cmath>
  15. #include<complex>
  16. #include<string>
  17. #include<algorithm>
  18. #include<iostream>
  19. #define eps 1e-9
  20. #define LL long long
  21. #define PI acos(-1.0)
  22. #define bitnum(a) __builtin_popcount(a)
  23. using namespace std;
  24. const int N = 1005;
  25. const int M = 10005;
  26. const int inf = 1000000007;
  27. const int mod = 1000000007;
  28. struct edge
  29. {
  30. int v,to;
  31. }e[2*M];
  32. struct node
  33. {
  34. int u,k;
  35. node(){}
  36. node(int _u,int _k):u(_u),k(_k){}
  37. };
  38. int p,v[N],a[M],b[M],h[N];
  39. bool flag;
  40. void add_edge(int u,int v)
  41. {
  42. e[p].v=v;
  43. e[p].to=h[u];
  44. h[u]=p++;
  45. }
  46. void bfs(int u,int k)
  47. {
  48. queue<node> q;
  49. int i;
  50. v[u]=k;
  51. q.push(node(u,k));
  52. while(!q.empty())
  53. {
  54. u=q.front().u;
  55. k=q.front().k;
  56. q.pop();
  57. for(i=h[u];i+1;i=e[i].to)
  58. {
  59. if(v[e[i].v]==k)
  60. {
  61. flag=false;
  62. return ;
  63. }
  64. if(!v[e[i].v])
  65. {
  66. v[e[i].v]=-k;
  67. q.push(node(e[i].v,-k));
  68. }
  69. }
  70. }
  71. }
  72. int main()
  73. {
  74. int n,m,x,y,s,i;
  75. while(~scanf("%d%d%d%d",&n,&m,&x,&y))
  76. {
  77. p=0;
  78. flag=true;
  79. memset(v,0,sizeof(v));
  80. memset(h,-1,sizeof(h));
  81. for(i=0;i<m;i++)
  82. {
  83. scanf("%d%d",&a[i],&b[i]);
  84. add_edge(a[i],b[i]);
  85. add_edge(b[i],a[i]);
  86. }
  87. for(i=0;i<x;i++)
  88. {
  89. scanf("%d",&s);
  90. if(v[s]==-1)
  91. flag=false;
  92. bfs(s,1);
  93. }
  94. for(i=0;i<y;i++)
  95. {
  96. scanf("%d",&s);
  97. if(v[s]==1)
  98. flag=false;
  99. bfs(s,-1);
  100. }
  101. for(i=0;i<m&&flag;i++)
  102. if(!v[a[i]]&&!v[b[i]])
  103. bfs(a[i],1);
  104. for(i=1;i<=n&&flag;i++)
  105. if(!v[i])
  106. {
  107. flag=false;
  108. break;
  109. }
  110. if(flag)
  111. puts("YES");
  112. else
  113. puts("NO");
  114. }
  115. return 0;
  116. }

 Problem 1004 A Simple Math Problem

Accept: 0    Submit: 0
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)

 Problem Description

Given two positive integers a and b,find suitable X and Y to meet the conditions:

X+Y=a

Least Common Multiple (X, Y) =b

 Input

Input includes multiple sets of test data.Each test data occupies one line,including two positive integers a(1≤a≤2*10^4),b(1≤b≤10^9),and their meanings are shown in the description.Contains most of the 12W test cases.

 Output

For each set of input data,output a line of two integers,representing X, Y.If you cannot find such X and Y,output one line of "No Solution"(without quotation).

 Sample Input

6 8
798 10780

 Sample Output

No Solution
308 490

 Problem Idea

解题思路:

【题意】

给你两个整数a和b

求X和Y,满足X+Y=a,且LCM(X,Y)=b [LCM(X,Y)表示X和Y的最小公倍数]

若不存在,输出"No Solution"

否则输出X最小的解

【类型】
数学推导题
【分析】

现场赛的时候,咋看一眼感觉是水题啊,a的范围才10^4,那我枚举一下X和Y,然后判断它们的最小公倍数是不是b不就完事了?

但看做的人并不多,又仔细看了下题,发现题目组数有点多,12万,好吧,放弃暴力枚举

首先,学过最小公倍数的我们知道,两数之积等于两数的最大公约数乘最小公倍数,用式子表示如下

X*Y=LCM(X,Y)*GCD(X,Y)

于是,我们不妨假设GCD(X,Y)=k,那么我们可以知道

假设X≥Y,则

这个方程组还是好解的

无解的情况有如下三种(满足任意一种都是无解):

【时间复杂度&&优化】
O(1)

题目链接→HDU 5974 A Simple Math Problem

 Source Code

  1. /*Sherlock and Watson and Adler*/
  2. #pragma comment(linker, "/STACK:1024000000,1024000000")
  3. #include<stdio.h>
  4. #include<string.h>
  5. #include<stdlib.h>
  6. #include<queue>
  7. #include<stack>
  8. #include<math.h>
  9. #include<vector>
  10. #include<map>
  11. #include<set>
  12. #include<list>
  13. #include<bitset>
  14. #include<cmath>
  15. #include<complex>
  16. #include<string>
  17. #include<algorithm>
  18. #include<iostream>
  19. #define eps 1e-9
  20. #define LL long long
  21. #define PI acos(-1.0)
  22. #define bitnum(a) __builtin_popcount(a)
  23. using namespace std;
  24. const int N = 1005;
  25. const int M = 10005;
  26. const int inf = 1000000007;
  27. const int mod = 1000000007;
  28. __int64 gcd(__int64 a,__int64 b)
  29. {
  30. if(a%b)
  31. return gcd(b,a%b);
  32. return b;
  33. }
  34. int main()
  35. {
  36. __int64 a,b,k,d,X,Y,s;
  37. while(~scanf("%I64d%I64d",&a,&b))
  38. {
  39. k=gcd(a,b);
  40. d=a*a-4*k*b;
  41. if(d<0)
  42. {
  43. puts("No Solution");
  44. continue;
  45. }
  46. s=(__int64)sqrt(1.0*d);
  47. if(s*s!=d||(s+a)%2)
  48. {
  49. puts("No Solution");
  50. continue;
  51. }
  52. X=(s+a)/2;
  53. Y=a-X;
  54. if(X>Y)
  55. swap(X,Y);
  56. printf("%I64d %I64d\n",X,Y);
  57. }
  58. return 0;
  59. }

 Problem 1006 Detachment

Accept: 0    Submit: 0
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)

 Problem Description

In a highly developed alien society, the habitats are almost infinite dimensional space.

In the history of this planet,there is an old puzzle.

You have a line segment with x units’ length representing one dimension.The line segment can be split into a number of small line segments: a1,a2, … (x= a1+a2+…) assigned to different dimensions. And then, the multidimensional space has been established. Now there are two requirements for this space:

1.Two different small line segments cannot be equal ( ai≠aj when i≠j).

2.Make this multidimensional space size s as large as possible (s= a1∗a2*...).Note that it allows to keep one dimension.That's to say, the number of ai can be only one.

Now can you solve this question and find the maximum size of the space?(For the final number is too large,your answer will be modulo 10^9+7)

 Input

The first line is an integer T,meaning the number of test cases.

Then T lines follow. Each line contains one integer x.

1≤T≤10^6, 1≤x≤10^9

 Output

Maximum s you can get modulo 10^9+7. Note that we wants to be greatest product before modulo 10^9+7.

 Sample Input

1
4

 Sample Output

4

 Problem Idea

解题思路:

【题意】

给定一个自然数x,让你给出一种拆分方式x=a1+a2+...(ai≠aj),使得每个小部分的乘积s=a1*a2*...最大

【类型】
贪心构造
【分析】

此题关键在于得出如何能使乘积s最大

按照以往经验,必然是取一段连续自然数能够使得乘积最大,而这段连续自然数可从2开始(为啥不从1开始?从1开始还不如将这个1给这段连续自然数的最后一个数),于是我们可以得到形如2+3+4+...+k(k=2,3,...)的式子,而x是10^9内的任意整数,我们不可能恰好能够凑成连续自然数之和,可能会多出△x

而这个△x的值,我可以保证它的范围为0≤△x≤k,相信大于等于0还是好理解的,为什么会小于等于k呢?因为当它大于k时,原式不是可以增加一项?即2+3+4+...+k+(k+1)

那么多出来的△x怎么处理呢?显然是从后往前均摊给连续自然数中的(k-1)个数,为啥从后往前?因为若我们从前往后,总是会使连续自然数重复,不好处理

于是,在我们分配完△x之后,我们大致会得到下述两种式子:

①2*3*...*(i-1)*(i+1)*...*k*(k+1)

②3*4*...*i*(i+1)*...*k*(k+2)

显然,我们要计算此结果,可以借助阶乘,而阶乘中缺失的项,我们除掉就可以了,那么便会涉及除法取模,显然需要用到乘法逆元

做法讲解完毕,以下是为什么连续段乘积最大的大概证明:

【时间复杂度&&优化】
O(logn)

题目链接→HDU 5976 Detachment

 Source Code

  1. /*Sherlock and Watson and Adler*/
  2. #pragma comment(linker, "/STACK:1024000000,1024000000")
  3. #include<stdio.h>
  4. #include<string.h>
  5. #include<stdlib.h>
  6. #include<queue>
  7. #include<stack>
  8. #include<math.h>
  9. #include<vector>
  10. #include<map>
  11. #include<set>
  12. #include<list>
  13. #include<bitset>
  14. #include<cmath>
  15. #include<complex>
  16. #include<string>
  17. #include<algorithm>
  18. #include<iostream>
  19. #define eps 1e-9
  20. #define LL long long
  21. #define PI acos(-1.0)
  22. #define bitnum(a) __builtin_popcount(a)
  23. using namespace std;
  24. const int N = 45000;
  25. const int M = 10005;
  26. const int inf = 1000000007;
  27. const int mod = 1000000007;
  28. __int64 inv[N]={0,1};//逆元筛
  29. __int64 f[N]={1,1};//阶乘
  30. int main()
  31. {
  32. int t,i,x,l,r,mid,k;
  33. __int64 ans;
  34. for(i=2;i<N;i++)
  35. {
  36. inv[i]=inv[mod%i]*(mod-mod/i)%mod;
  37. f[i]=(f[i-1]*i)%mod;
  38. }
  39. scanf("%d",&t);
  40. while(t--)
  41. {
  42. scanf("%d",&x);
  43. if(x<=1)
  44. {
  45. printf("%d\n",x);
  46. continue;
  47. }
  48. l=k=2,r=N;
  49. while(l<=r)
  50. {
  51. mid=(l+r)/2;
  52. if((mid+2)*(mid-1)/2<=x)
  53. l=mid+1,k=max(k,mid);
  54. else
  55. r=mid-1;
  56. }
  57. //printf("%d\n",k);
  58. x-=(k+2)*(k-1)/2;
  59. if(x==k)//3*4*...*(k-1)*k*(k+2)
  60. ans=(f[k]*inv[2])%mod*(k+2)%mod;
  61. else if(x==0)
  62. ans=f[k];
  63. else
  64. ans=(f[k+1]*inv[k-x+1])%mod;
  65. printf("%I64d\n",ans);
  66. }
  67. return 0;
  68. }

 Problem 1008 To begin or not to begin

Accept: 0    Submit: 0
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)

 Problem Description

A box contains black balls and a single red ball. Alice and Bob draw balls from this box without replacement, alternating after each draws until the red ball is drawn. The game is won by the player who happens to draw the single red ball. Bob is a gentleman and offers Alice the choice of whether she wants to start or not. Alice has a hunch that she might be better off if she starts; after all, she might succeed in the first draw. On the other hand, if her first draw yields a black ball, then Bob’s chances to draw the red ball in his first draw are increased, because then one black ball is already removed from the box. How should Alice decide in order to maximize her probability of winning? Help Alice with decision.

 Input

Multiple test cases (number of test cases≤50), process till end of input.

For each case, a positive integer k (1≤k≤10^5) is given on a single line.

 Output

For each case, output:

1, if the player who starts drawing has an advantage

2, if the player who starts drawing has a disadvantage

0, if Alice's and Bob's chances are equal, no matter who starts drawing

on a single line.

 Sample Input

1
2

 Sample Output

0
1

 Problem Idea

解题思路:

【题意】

箱子里有1个红球和k个黑球

Alice和Bob轮流不放回地从箱子里随机取出一个球

当某人取到红球时获得胜利,游戏结束

问先手是否获胜几率更大,几率更大,输出"1";几率更小,输出"2";几率相等,输出"0"

【类型】
概率水题
【分析】

此题关键还是要多尝试,手动计算一下

当k=1时,一个红球和一个黑球,先手获胜的概率P为

当k=2时,一个红球和两个黑球,先手获胜的概率P为

当k=3时,一个红球和三个黑球,先手获胜的概率P为

故,当k时,先手获胜的概率P为

那我只需判断两者大小关系即可

【时间复杂度&&优化】
O(1)

题目链接→HDU 5978 To begin or not to begin

 Source Code

  1. /*Sherlock and Watson and Adler*/
  2. #pragma comment(linker, "/STACK:1024000000,1024000000")
  3. #include<stdio.h>
  4. #include<string.h>
  5. #include<stdlib.h>
  6. #include<queue>
  7. #include<stack>
  8. #include<math.h>
  9. #include<vector>
  10. #include<map>
  11. #include<set>
  12. #include<list>
  13. #include<bitset>
  14. #include<cmath>
  15. #include<complex>
  16. #include<string>
  17. #include<algorithm>
  18. #include<iostream>
  19. #define eps 1e-9
  20. #define LL long long
  21. #define PI acos(-1.0)
  22. #define bitnum(a) __builtin_popcount(a)
  23. using namespace std;
  24. const int N = 5005;
  25. const int M = 100005;
  26. const int inf = 1000000007;
  27. const int mod = 1000000007;
  28. const int MAXN = 100005;
  29. int main()
  30. {
  31. int k,p;
  32. while(~scanf("%d",&k))
  33. {
  34. p=k/2+1;
  35. if(p>k+1-p)
  36. puts("1");
  37. else if(p<k+1-p)
  38. puts("2");
  39. else
  40. puts("0");
  41. }
  42. return 0;
  43. }

 Problem 1009 Convex

Accept: 0    Submit: 0
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)

 Problem Description

We have a special convex that all points have the same distance to origin point.
As you know we can get N segments after linking the origin point and the points on the convex. We can also get N angles between each pair of the neighbor segments.

Now give you the data about the angle, please calculate the area of the convex

 Input

There are multiple test cases.

The first line contains two integer N and D indicating the number of the points and their distance to origin. (3 <= N <= 10, 1 <= D <= 10)

The next lines contain N integers indicating the angles. The sum of the N numbers is always 360.

 Output

For each test case output one float numbers indicating the area of the convex. The printed values should have 3 digits after the decimal point.

 Sample Input

4 1
90 90 90 90
6 1
60 60 60 60 60 60

 Sample Output

2.000
2.598

 Problem Idea

解题思路:

【题意】

二维坐标中有N个点,它们到原点的距离均为D

将这N个点分别与原点相连,现在告诉你任意相邻两条线段的夹角为θi,求这N个点构成的凸包面积(N边形面积)

【类型】
三角形面积水题
【分析】

题目大概样子如下

由图可知,n边形的面积可以拆分成n个三角形面积之和

而已知每个三角形的两边及两边夹角,我们可以通过三角形面积公式算出每个三角形的面积,相加之和便是最终的n边形面积

由于math.h头文件中封装的sin运算是以弧度制来计算的,而题目所给的是角度制,故我们还需多一步角度转弧度

【时间复杂度&&优化】
O(1)

题目链接→HDU 5979 Convex

 Source Code

  1. /*Sherlock and Watson and Adler*/
  2. #pragma comment(linker, "/STACK:1024000000,1024000000")
  3. #include<stdio.h>
  4. #include<string.h>
  5. #include<stdlib.h>
  6. #include<queue>
  7. #include<stack>
  8. #include<math.h>
  9. #include<vector>
  10. #include<map>
  11. #include<set>
  12. #include<list>
  13. #include<bitset>
  14. #include<cmath>
  15. #include<complex>
  16. #include<string>
  17. #include<algorithm>
  18. #include<iostream>
  19. #define eps 1e-9
  20. #define LL long long
  21. #define PI acos(-1.0)
  22. #define bitnum(a) __builtin_popcount(a)
  23. using namespace std;
  24. const int N = 5005;
  25. const int M = 100005;
  26. const int inf = 1000000007;
  27. const int mod = 1000000007;
  28. const int MAXN = 100005;
  29. int main()
  30. {
  31. int n,d,i,x;
  32. double ans;
  33. while(~scanf("%d%d",&n,&d))
  34. {
  35. ans=0;
  36. for(i=0;i<n;i++)
  37. {
  38. scanf("%d",&x);
  39. ans+=d*d*sin(PI*x/180)/2;
  40. }
  41. printf("%.3f\n",ans);
  42. }
  43. return 0;
  44. }

 Problem 1010 Find Small A

Accept: 0    Submit: 0
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)

 Problem Description

As is known to all,the ASCII of character 'a' is 97. Now,find out how many character 'a' in a group of given numbers. Please note that the numbers here are given by 32 bits’ integers in the computer.That means,1digit represents 4 characters(one character is represented by 8 bits’ binary digits).

 Input

The input contains a set of test data.The first number is one positive integer N (1≤N≤100),and then N positive integersai (1≤ ai≤2^32 - 1) follow

 Output

Output one line,including an integer representing the number of 'a' in the group of given numbers.

 Sample Input

3
97 24929 100

 Sample Output

3

 Problem Idea

解题思路:

【题意】

给你n个32位整数,每个整数可以表示成4个字符(因为一个字符在计算机中占8位),问n个整数共包含多少个字符'a'

【类型】
签到题
【分析】

由于一个字符占二进制8位,所以每个整数相当于转化为2^8=256进制数

那么将32位整数循环对256取模,看是不是97(字符'a')即可

其中需要注意的一点是,2^32-1已经超过了int型的范围,故须定义成 __int64 或 long long

int型的最大值为2^31-1

【时间复杂度&&优化】
O(1)

题目链接→HDU 5980 Find Small A

 Source Code

  1. /*Sherlock and Watson and Adler*/
  2. #pragma comment(linker, "/STACK:1024000000,1024000000")
  3. #include<stdio.h>
  4. #include<string.h>
  5. #include<stdlib.h>
  6. #include<queue>
  7. #include<stack>
  8. #include<math.h>
  9. #include<vector>
  10. #include<map>
  11. #include<set>
  12. #include<list>
  13. #include<bitset>
  14. #include<cmath>
  15. #include<complex>
  16. #include<string>
  17. #include<algorithm>
  18. #include<iostream>
  19. #define eps 1e-9
  20. #define LL long long
  21. #define PI acos(-1.0)
  22. #define bitnum(a) __builtin_popcount(a)
  23. using namespace std;
  24. const int N = 5005;
  25. const int M = 100005;
  26. const int inf = 1000000007;
  27. const int mod = 1000000007;
  28. const int MAXN = 100005;
  29. int main()
  30. {
  31. int n,i,ans;
  32. __int64 a;
  33. while(~scanf("%d",&n))
  34. {
  35. ans=0;
  36. for(i=0;i<n;i++)
  37. {
  38. scanf("%I64d",&a);
  39. while(a)
  40. {
  41. if(a%256==97)
  42. ans++;
  43. a/=256;
  44. }
  45. }
  46. printf("%d\n",ans);
  47. }
  48. return 0;
  49. }

菜鸟成长记

2016ACM/ICPC亚洲区大连站现场赛题解报告(转)的更多相关文章

  1. 2016ACM/ICPC亚洲区大连站-重现赛

    题目链接:http://acm.hdu.edu.cn/search.php?field=problem&key=2016ACM%2FICPC%D1%C7%D6%DE%C7%F8%B4%F3%C ...

  2. 2016ACM/ICPC亚洲区大连站-重现赛(感谢大连海事大学)(7/10)

    1001题意:n个人,给m对敌对关系,X个好人,Y个坏人.现在问你是否每个人都是要么是好人,要么是坏人. 先看看与X,Y个人有联通的人是否有矛盾,没有矛盾的话咋就继续遍历那些不确定的人关系,随便取一个 ...

  3. 2016 ACM/ICPC亚洲区大连站-重现赛 解题报告

    任意门:http://acm.hdu.edu.cn/showproblem.php?pid=5979 按AC顺序: I - Convex Time limit    1000 ms Memory li ...

  4. HDU 5976 Detachment 【贪心】 (2016ACM/ICPC亚洲区大连站)

    Detachment Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total ...

  5. HDU 5979 Convex【计算几何】 (2016ACM/ICPC亚洲区大连站)

    Convex Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Subm ...

  6. 2016 ACM/ICPC亚洲区青岛站现场赛(部分题解)

    摘要 本文主要列举并求解了2016 ACM/ICPC亚洲区青岛站现场赛的部分真题,着重介绍了各个题目的解题思路,结合详细的AC代码,意在熟悉青岛赛区的出题策略,以备战2018青岛站现场赛. HDU 5 ...

  7. 2013ACM/ICPC亚洲区南京站现场赛---Poor Warehouse Keeper(贪心)

    题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=4803 Problem Description Jenny is a warehouse keeper. ...

  8. 2016ACM/ICPC亚洲区沈阳站-重现赛赛题

    今天做的沈阳站重现赛,自己还是太水,只做出两道签到题,另外两道看懂题意了,但是也没能做出来. 1. Thickest Burger Time Limit: 2000/1000 MS (Java/Oth ...

  9. 2013ACM/ICPC亚洲区南京站现场赛-HDU4809(树形DP)

    为了这个题解第一次写东西..(我只是来膜拜爱看touhou的出题人的).. 首先以为对称性质..我们求出露琪诺的魔法值的期望就可以了..之后乘以3就是答案..(话说她那么笨..能算出来么..⑨⑨⑨⑨⑨ ...

随机推荐

  1. (转)CreateThread与_beginthread,内存泄漏为何因(原帖排版有些不好 ,所以我稍微整理下)

            在写c++代码时,一直牢记着一句话:决不应该调用CreateThread. 应该使用Visual   C++运行时库函数_beginthreadex.好像CreateThread函数就 ...

  2. iis7.5安装配置php环境详细清晰教程,三步实现【图文】

    iis7.5安装配置php环境详细清晰教程,三步实现[图文] iis7.5是安装在win7.win8里的web服务器,win2003.win2000的web服务器使用的是iis6.0,由于win7.w ...

  3. java 将小数拆分为两部分+浮点型精度丢失问题

    问题:将一个String类型的小数拆分为整数部分和小数部分,如9.9拆分为9和0.9 1.将小数的整数和小数部分拆分开 public float numberSub(String totalMoney ...

  4. JVM基本配置与调优

    JVM基本配置与调优 JVM调优,一般都是针对堆内存配置调优. 如图:堆内存分新生代和老年代,新生代又划分为eden区.from区.to区. 一.区域释义 JVM内存模型,堆内存代划分为新生代和老年代 ...

  5. rootpw密码生成方法/c-exit

    linux kickstart文件里rootpw密码可以使用明文,也可以使用加密过的值,这里主要介绍下三种加密方法:md5.sha256.sha512 使用明文的方法 rootpw "pas ...

  6. MongoDB使用中的一些问题

    1.count统计结果错误 这是由于分布式集群正在迁移数据,它导致count结果值错误,需要使用aggregate pipeline来得到正确统计结果,例如: db.collection.aggreg ...

  7. hive union all使用注意

    UNION用于联合多个select语句的结果集,合并为一个独立的结果集,结果集去重. UNION ALL也是用于联合多个select语句的结果集.但是不能消除重复行.现在hive只支持UNION AL ...

  8. Python面试题之Python中应该使用%还是format来格式化字符串?

    Python中格式化字符串目前有两种阵营:%和format,我们应该选择哪种呢? 自从Python2.6引入了format这个格式化字符串的方法之后,我认为%还是format这根本就不算个问题.不信你 ...

  9. 20145327 《Java程序设计》第一周学习总结

    20145327 <Java程序设计>第一周学习总结 教材学习内容总结 Java根据领域不同,区分为Java SE.Java EE与Java ME三大平台.Java SE是各应用平台的基础 ...

  10. Java对map进行排序并生成序号

    最近做的项目有这样一个需求:要求对map中的值进行排序并生成序号.如果值相等则序号不变:如果不相等序号为该数数值在所有元素中的索引.如下表所示: Key(String) Value(Float) Id ...