Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SRM578 解説
Search
tozangezan
May 03, 2013
Programming
0
250
SRM578 解説
tozangezan
May 03, 2013
Tweet
Share
More Decks by tozangezan
See All by tozangezan
SRM573 Div1Hard Div2Hard 解説
tozangezan
1
240
Other Decks in Programming
See All in Programming
GitHub Copilotのススメ
marcy731
1
200
Elm Form Validation
bkuhlmann
0
510
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
490
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
150
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
110
新宿ダンジョンを可視化してみた
satoshi7190
2
260
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
1
180
Site Reliability Engineering for GMO
pyama86
8
1k
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
720
Hanami and htmx
bkuhlmann
0
210
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
270
Git Lint
bkuhlmann
4
750
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.6k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
78
42k
KATA
mclloyd
15
12k
What the flash - Photography Introduction
edds
64
11k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
2
3.4k
Producing Creativity
orderedlist
PRO
337
39k
For a Future-Friendly Web
brad_frost
172
9k
What’s in a name? Adding method to the madness
productmarketing
PRO
16
2.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
Building Effective Engineering Teams - LeadDev
addyosmani
28
1.8k
Transcript
SRM 578 Div2 Easy&Hard Div1 Medium 解説 By tozangezan
Div2 Easy (1) これを… N K ret[0]=? ret[1]=?
Div2 Easy (2) こうして… N K ret[0]=max(0,N-K) ret[1]=?
Div2 Easy (3) こうじゃ N K ret[0]=max(0,N-K) ret[1]=N-(K+1)/2
Div2 Hard (1) これを…
Div2 Hard (2) こうして… dp[0] [1] [2] [3] [4] [5]
[6] [7] [8] [9] [10] ... [N+1]
Div2 Hard (3) こうじゃ dp[0] [1] [2] [3] [4] [5]
[6] [7] [8] [9] [10] ... [N+1] dp[3]=dp[0]+dp[1] +dp[2] dp[0]=1 dp[9]=dp[3]+dp[4]+ ...+dp[8] Answer
Div1 Medium (1) これを…
Div1 Medium (2) こうして… dp[last][now]->dp[now][next] (if now->next vaild) At first,
dp[i][j]=1(0<=i<j<=N-1). The answer is (sum of dp[i][j])+N+1
Div1 Medium (2) こうじゃ dp[last][now]->dp[now][next] (if now->next vaild) Valid: interval
[left,right] (left<=last<next<=rig ht) is not exist Calculate valid edge in advance.
The End 右の写真のように、多摩 動物公園にはオオカミが います。