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
270
SRM578 解説
tozangezan
May 03, 2013
Tweet
Share
More Decks by tozangezan
See All by tozangezan
SRM573 Div1Hard Div2Hard 解説
tozangezan
1
260
Other Decks in Programming
See All in Programming
速いWebフレームワークを作る
yusukebe
5
1.7k
RDoc meets YARD
okuramasafumi
4
170
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
1.9k
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
440
旅行プランAIエージェント開発の裏側
ippo012
2
880
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
0
380
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
210
意外と簡単!?フロントエンドでパスキー認証を実現する WebAuthn
teamlab
PRO
2
700
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
500
[FEConf 2025] 모노레포 절망편, 14개 레포로 부활하기까지 걸린 1년
mmmaxkim
0
1.6k
AWS発のAIエディタKiroを使ってみた
iriikeita
1
180
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
200
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Making Projects Easy
brettharned
117
6.4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Building an army of robots
kneath
306
46k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Documentation Writing (for coders)
carmenintech
74
5k
How to Ace a Technical Interview
jacobian
279
23k
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 右の写真のように、多摩 動物公園にはオオカミが います。