<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>drken1215</author_name>
  <author_url>https://blog.hatena.ne.jp/drken1215/</author_url>
  <blog_title>けんちょんの競プロ精進記録</blog_title>
  <blog_url>https://drken1215.hatenablog.com/</blog_url>
  <categories>
    <anon>AtCoder</anon>
    <anon>AtCoder250点</anon>
    <anon>ABC-C</anon>
    <anon>灰色diff</anon>
    <anon>NoviSteps5Q</anon>
    <anon>易しい計算量改善</anon>
    <anon>計算量改善：O(N)で求められる式に変形する</anon>
    <anon>数列</anon>
    <anon>最大値や最小値に着目する</anon>
    <anon>最適化問題</anon>
    <anon>最大スコア</anon>
  </categories>
  <description>計算量改善のことを本当に知らないと、TLE に悩むかもしれない。 問題へのリンク 問題概要 長さ の 2 つの数列 、 が与えられる。 1 以上 以下の整数 を選んで、 の最大値を求めよ。 制約 考えたこと 最も素直に考えると、次のように二重 for 文を用いて解きたくなるかもしれない。 long long res = 0; for (int i = 0; i &lt; N; i++) { for (int j = 0; j &lt; N; j++) { res = max(res, A[i] + B[j]); } } しかしこの解法の計算量は となる。これでは TLE となってしまう。 そこで、次のよう…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdrken1215.hatenablog.com%2Fentry%2F2024%2F09%2F29%2F010554&quot; title=&quot;AtCoder ABC 373 C - Max Ai+Bj (5Q, 灰色, 250 点) - けんちょんの競プロ精進記録&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>https://cdn.user.blog.st-hatena.com/default_entry_og_image/80936665/1687765056723440</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-09-29 01:05:54</published>
  <title>AtCoder ABC 373 C - Max Ai+Bj (5Q, 灰色, 250 点)</title>
  <type>rich</type>
  <url>https://drken1215.hatenablog.com/entry/2024/09/29/010554</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
