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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
Workers Cache を知る
syumai
0
360
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2.1k
Event is what happens
moro
2
780
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
590
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
golang-bob.pdf
iwatsukayura
0
130
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
210
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
気持ちぃ〜角丸 Squircle
ryu1013
0
310
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Designing for Performance
lara
612
70k
Code Reviewing Like a Champion
maltzj
529
40k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
Ruling the World: When Life Gets Gamed
codingconduct
0
400
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Bash Introduction
62gerente
615
220k
Statistics for Hackers
jakevdp
799
230k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
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 右の写真のように、多摩 動物公園にはオオカミが います。