<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mayokoex</author_name>
  <author_url>https://blog.hatena.ne.jp/mayokoex/</author_url>
  <blog_title>mayoko’s diary</blog_title>
  <blog_url>https://mayokoex.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>問題 https://www.facebook.com/hackercup/problem/1640119959603837/ 解法 まず, はしごを座標順にソートして, よくある stack のアレを使います。 mayokoex.hatenablog.com この記事のテクニックを使えば, O(N) であるハシゴからどこまで蛇が繋がれるのかがわかります。dp[i] = (i 番目のはしごと, i 番目のはしごと高さの等しい, 蛇がつながることの出来る i 番目未満のはしごの間における, 蛇の長さの二乗の和) とします。例えば問題文の Case #3 だと, dp[0] = 0 dp[1] =…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmayokoex.hatenablog.com%2Fentry%2F2016%2F01%2F24%2F094908&quot; title=&quot;Facebook Hacker Cup 2016 Round 2 Snakes and Ladders - mayoko’s diary&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-01-24 09:49:08</published>
  <title>Facebook Hacker Cup 2016 Round 2 Snakes and Ladders</title>
  <type>rich</type>
  <url>https://mayokoex.hatenablog.com/entry/2016/01/24/094908</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
