Hatena::Grouptopcoder

hotpepsiの練習帳

2016-02-01

SRM 659

21:31

https://competitiveprogramming.info/topcoder/srm/round/16462/div/1

Div1 Easy (250) ApplesAndOrangesEasy

問題

  • N個のりんごまたはみかんがあり、1つずつ順番に全て食べる
  • 連続してK個食べたうちの、りんごはK/2個以下である
  • りんごを食べた情報である配列infoが与えられる
  • info[i]番目に食べたのはりんごである
  • りんごを食べられる最大数を求める

方針

結果

x-- 0pt 199th/293 rating 1350 -> 1303 (-47)

単純に最後のK個の範囲内にN/2個未満なら置く、にしてしまった。


http://togetter.com/li/820832

トラックバック - https://topcoder-g-hatena-ne-jp.jag-icpc.org/firewood/20160201