<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>h0rnet</author_name>
  <author_url>https://blog.hatena.ne.jp/h0rnet/</author_url>
  <blog_title>0w1</blog_title>
  <blog_url>https://h0rnet.hatenablog.com/</blog_url>
  <categories>
    <anon>Codeforces</anon>
    <anon>DP</anon>
  </categories>
  <description>Problem - C - Codeforces題意： 有 N 個球排一排，用價值 V[ i ] 和顏色 C[ i ] 描述。接著 Q 筆詢問，給你 A, B，要求一個序列的最大歡樂值。序列必須是升序的下標，歡樂值得計算方法為：若序列中某個下標 i 不為序列最小值，且前面一個下標 i - 1 的顏色 C[ i - 1 ] 和 C[ i ] 相同，那麼該元素的貢獻為 V[ i ] * B ; 否則該元素的貢獻為 V[ i ] * A。資料規模： The first line contains two integers n and q (1 ≤ n ≤ 1e5; 1 ≤ q ≤ 500). The…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fh0rnet.hatenablog.com%2Fentry%2F2017%2F01%2F17%2FCFR_264_C__Choosing_Balls_%2528_DP_%2529&quot; title=&quot;CFR 264 C. Choosing Balls ( DP ) - 0w1&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>2017-01-17 01:29:14</published>
  <title>CFR 264 C. Choosing Balls ( DP )</title>
  <type>rich</type>
  <url>https://h0rnet.hatenablog.com/entry/2017/01/17/CFR_264_C__Choosing_Balls_%28_DP_%29</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
