[The third bullet of lamps] main function-hdu1085-AC under Taishan

Source: Internet
Author: User

Just after coming down from the Thai mountains, I felt that as long as the walking was stable and the rest was not stopped, it was a weak blow to dongtianmen or 18 disks .. Say something about half a ninety-nine in the industry ...... That's how sunrise is ...... 36 h not sleeping ~~~

It is slightly different from the template. Bin Laden scored 1, 2, and 5 points, asking him for the minimum amount of money he could not make. From this question, I finally figured out that the two repeated loops are used to evaluate the power, C1 is the first expression, C2 is the second expression, and the value of the array represents its subscript, c2 [I + J] = c1 [I] is to add the power value. There is no problem with the algorithm. The input format is stuck with three-side wa, so it should not be ......

# Include <iostream> # include <cstring> using namespace STD; const int INF = 10000; int c1 [INF + 1], C2 [INF + 1], c3 [INF + 1]; bool canchange; int money [3] = {1, 2, 5}; // number of times the original subscript is the power of the dog's day !!!! I cut the grass !! Int main () {int A, B, C; while (CIN> A> B> C & (! = 0 | B! = 0 | C! = 0) & (A + B + C> 0) // low-level error, Middle | written as &, broken eggs ...... {Memset (C1, 0, sizeof (C1); memset (C2, 0, sizeof (C2); memset (C3, 0, sizeof (C3 )); canchange = false; For (int t = 0; t <= A; t ++) {c1 [T] = 1 ;}for (INT I = 0; I <= A; I ++) {for (Int J = 0; j <= B * 2; j + = 2) {c2 [I + J] + = c1 [I] ;}} for (INT I = 0; I <= a + (2 * B); I ++) {for (Int J = 0; j <= C * 5; j + = 5) {C3 [I + J] + = c2 [I] ;}} for (INT I = 0; I <= a + 2 * B + 5 * C; I ++) {If (C3 [I] = 0) {cout <I <Endl; canchange = true; break ;}} if (canchange = false) {cout <A * 1 + B * 2 + C * 5 + 1 <Endl; // if there is no way to do this, consider} return 0 ;}

Finally, I would like to express my deep nostalgia to Comrade bin Laden .. $25000000 Let Bush digest it ......


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.