摘要:
Matches We can make digits with matches as shown below: Given N matches, find the number of different numbers representable using the matches. We shal 阅读全文
posted @ 2016-08-24 16:42
Yan_Bin
阅读(318)
评论(0)
推荐(0)
摘要:
Cheerleaders In most professional sporting events, cheerleaders play a major role in entertaining the spectators. Their roles are substantial during b 阅读全文
posted @ 2016-08-24 15:27
Yan_Bin
阅读(370)
评论(0)
推荐(0)
摘要:
题意:从1~n中选出3个整数,使得他们三边能组成三角形,给定一个n,问能组成多少个不同的三角形? 分析:n最大能达到1000000,所以只能用O(n)来解决。 设最大边为x的三角形个数为C(x),y+z>x , x-y<z<x,当y=1时 z无解,y=2,z一个解……y=x-1,z有x-2个解 所以 阅读全文
posted @ 2016-08-24 01:04
Yan_Bin
阅读(147)
评论(0)
推荐(0)
摘要:
Chess Queen You probably know how the game of chess is played and how chess queen operates. Two chess queens are in attacking position when they are o 阅读全文
posted @ 2016-08-24 00:16
Yan_Bin
阅读(215)
评论(0)
推荐(0)