Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SRM578 解説

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

SRM578 解説

Avatar for tozangezan

tozangezan

May 03, 2013
Tweet

More Decks by tozangezan

Other Decks in Programming

Transcript

  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
  2. 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
  3. 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.