TakeoffYoung

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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)

  

posted on 2015-11-04 09:42  TakeoffYoung  阅读(139)  评论(0编辑  收藏  举报