Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BOJ] 13305 #22

Open
HyomK opened this issue Jan 27, 2023 · 0 comments
Open

[BOJ] 13305 #22

HyomK opened this issue Jan 27, 2023 · 0 comments

Comments

@HyomK
Copy link
Owner

HyomK commented Jan 27, 2023

백준 13305 주유소
[문제유형] 그리디

https://www.acmicpc.net/problem/13305


        //오일값이 싸지면 무조건 교체하는 것이 이득
        var now = city[0]

        for(i in 0 until city.size-1 ){
            now = Math.min(now,city[i])
            result += now * road[i]
        }

HyomK added a commit that referenced this issue Jan 27, 2023
@HyomK HyomK changed the title [BOJ] 11305 [BOJ] 13305 Jan 28, 2023
HyomK added a commit that referenced this issue Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant