2014 Zhejiang Provincial Competition

Source: Internet
Author: User

ZOJ 3777 Problem Arrangement

State compression DP, seed dp,dp[s][m] represents the number of scenarios in which the current occupied position has a set score of M, the parent is the total n!, the memory search is good to write

by FD

ZOJ 3785?

Geometric series, inverse yuan, fast power, of course, can be violent to find the circulation section, there is a mod must have a cycle section, because x^y%7 equivalent to (x%7) ^y, so can be divided into 6 series, as follows

1^1,2^2,3^3,4^4,5^5,6^6,0^7

1^8,2^9,3^10,4^11,5^12,6^13,0,^14

...

Each column is geometric series and then summed with geometric series a1* (q^n-1)/(q-1) = = a1* (q^n-1) *INV (q-1)

by FD

2014 Zhejiang Provincial Competition

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.