<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Area1</author_name>
  <author_url>https://blog.hatena.ne.jp/Area1/</author_url>
  <blog_title>Area1のif(memo[i][j])</blog_title>
  <blog_url>https://area.hateblo.jp/</blog_url>
  <categories>
    <anon>POJ</anon>
    <anon>データ構造</anon>
  </categories>
  <description>問題 0と1からなるnxmのマスが与えられる。この中に含まれる1のみからなるx軸とy軸に平行な長方形で最大の長方形の面積を求めよ。 やりかた ヒストグラム内の最大長方形の面積を求めるアルゴリズムを応用する。マスから一行読むごとにこのアルゴリズムを実施する。そのときにどれだけy軸方向に1が連続しているかを列ごとに蓄積しておくことで、その値をその行を読んだときのヒストグラムの高さとして考える事ができる。計算量O(nm)以下ソース。 int m, n; int h[2010]; int R[2010], L[2010]; int largest_hist(){ stack&lt;int&gt; S; for(l…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Farea.hateblo.jp%2Fentry%2F2018%2F06%2F07%2F161257&quot; title=&quot;POJ 3494 Largest Submatrix of All 1’s - Area1のif(memo[i][j])&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>2018-06-07 16:12:57</published>
  <title>POJ 3494 Largest Submatrix of All 1’s</title>
  <type>rich</type>
  <url>https://area.hateblo.jp/entry/2018/06/07/161257</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
