Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
SRM578 解説
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.8k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
8.4k
スマート反転とウェブアクセシビリティ
camiha
0
210
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
300
AHC070解法紹介
eijirou
0
130
Building an Out-of-Order CPU
latte72
1
800
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
130
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
540
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
150
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
150
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
150
Java 27新機能 / Java 27 new features
kishida
2
170
Featured
See All Featured
KATA
mclloyd
PRO
35
16k
Mind Mapping
helmedeiros
1
370
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
830
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
730
GraphQLとの向き合い方2022年版
quramy
50
15k
Git: the NoSQL Database
bkeepers
PRO
432
67k
The Curse of the Amulet
leimatthew05
3
15k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
250
Statistics for Hackers
jakevdp
799
230k
The Language of Interfaces
destraynor
162
27k
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 右の写真のように、多摩 動物公園にはオオカミが います。