码迷,mamicode.com
首页 > 其他好文 > 详细

2015-11-1-Training(for 2015th)

时间:2015-11-04 10:00:39      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:

A:(hdu2081)

Solution:

  get the last five digits, not mod 100000 cause the leading zero.

 

B:(hdu2075)

 

C:(hdu2071)

 

D:(hdu2070)

Solution:

  The 40th fibonacci number is greater the 1e9, so data type long long is necessary.

 

E:(hdu1040)

Solution:

  sort the array and outpt.

  The way to sort may be multitudinous, like bubble sort, merge sort, insert sort, selection sort, heap sort, quick sort, radix sort etc.

  the most useful is(by stealth)

std::sort(arr + l, arr + r);
// to sort array elements in [l, r)

 

F:(hdu1041)

Solution:

  we could get a recursion formula:

  F[n] = F[n-2] + 2^(n-3)

  and the result would be very large, so you should use Java or high precision.

 

G:(hdu2057)
Solution:

  use %X to input and output.

H:(hdu2055)

I:(hdu2101)

  

2015-11-1-Training(for 2015th)

标签:

原文地址:http://www.cnblogs.com/takeoffyoung/p/4935065.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!