Giter VIP home page Giter VIP logo

11052's Introduction

"11052"

made by Jaehyeok Choi

Welcome to Jaehyeok's github!

What is the problem?

button

What Algorithm should I use?

dynamic programming

What was the key point and the hard part?

Let;s save the max value in the dp array.

There is only one option for taking 1 card. Just buying one pack card. There is two option for taking 2 cards. (1+1) , (2). Save the larger value in dp array.

There is tree option for taking 3 cards. (1+1+1) , (1+2) , (3).

However, the biggest value of taking 2 cards is in the dp[2]. We already consider (1+1) (2) case in dp[2].

That means (dp[1]+dp[1]+dp[1]) case is smaller or same with (dp[2]+dp[1]) case.

So, there is two option for taking 3 cards.

3 option for taking 4 cards. (dp[1] + dp[3]) (dp[2] + dp[2]) (p[4])

3 option for taking 5 cards. (dp[1] + dp[4]) (dp[2] + dp[3]) (p[5])

.

.

.

Equation founded~~~

Where can I get more help, if I need it?

You can contact me through email, which is [email protected]. Thank you for visiting this github!

11052's People

Contributors

bulttaeng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.