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
280
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
SRM578 解説
tozangezan
May 03, 2013
More Decks by tozangezan
See All by tozangezan
SRM573 Div1Hard Div2Hard 解説
tozangezan
1
280
Other Decks in Programming
See All in Programming
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
180
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
380
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
110
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
130
Foundation Models frameworkで画像分析
ryodeveloper
1
130
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
170
yield再入門 #phpcon
o0h
PRO
0
720
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
850
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
120
AIが無かった頃の素敵な出会いの話
codmoninc
1
210
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
540
関数型プログラミングのメリットって何だろう?
wanko_it
0
190
Featured
See All Featured
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
250
How to build a perfect <img>
jonoalderson
1
5.8k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.2k
Practical Orchestrator
shlominoach
191
11k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
390
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
For a Future-Friendly Web
brad_frost
183
10k
Done Done
chrislema
186
16k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
What's in a price? How to price your products and services
michaelherold
247
13k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
270
Building Flexible Design Systems
yeseniaperezcruz
330
40k
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 右の写真のように、多摩 動物公園にはオオカミが います。