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

Source: Internet
Author: User

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 and so data type long long is necessary.

E: (hdu1040)

Solution:

Sort the array and outpt.

The the-to-sort May is multitudinous, like bubble sort, merge sort, insert sort, selection sort, heap sort, quick sort, RA Dix sort etc.

The most useful are (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 is 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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.