2013年7月23日

uva 11401 数三角形

摘要: Triangle CountingInput:Standard InputOutput:Standard OutputYou are givennrods of length 1, 2…, n. You have to pick any 3 of them & build a triangle. How many distinct triangles can you make? Note that, two triangles will be considered different if they have at least 1 pair of arms with different 阅读全文

posted @ 2013-07-23 19:55 雄.. 阅读(283) 评论(0) 推荐(0)

hdu 1104 数论+bfs

摘要: RemainderTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2122Accepted Submission(s): 449 Problem DescriptionCoco is a clever boy, who is good at mathematics. However, he is puzzled by a difficult mathematics problem. The problem is: Given three in 阅读全文

posted @ 2013-07-23 12:43 雄.. 阅读(193) 评论(0) 推荐(0)

poj 1061 青蛙的约会(二元一次不定方程)

摘要: Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面的。为了帮助这两只乐观的青蛙,你被要求写一个程序来判断这两只青蛙是否能够碰面,会在什么时候碰面。 我们把这两只青蛙分别叫做青蛙A和青蛙B,并且规定纬度线上东经0度处为原点,由东往西为正方向,单位长度1米,这样 阅读全文

posted @ 2013-07-23 09:27 雄.. 阅读(314) 评论(0) 推荐(0)

导航