2009-08-26
ImportantTasks
SRM 447, Div2, Div2 Level-1, Greedy, match, 90% |
Level-1は、比較的スムースに解けたが、Level-2は問題の意図を理解し間違えたため、解けなかった。Ratingは微減(1100->1081)。
最大何個のタスクを処理することができるか。
230.20/250
class ImportantTasks { public: int maximalCost(vector <int> complexity, vector <int> computers) { sort(complexity.rbegin(), complexity.rend()); sort(computers.rbegin(), computers.rend()); int tasks = 0; int i = 0, j = 0; while (i < complexity.size() && j < computers.size()) { if (complexity[i] <= computers[j]) { tasks++; i++; j++; } else { i++; } } return tasks; } };
コメントを書く
Welcome
2011/09/01 00:19
I was seroiulsy at DefCon 5 until I saw this post.
xcwzlbzzzq
2011/09/02 16:14
8TE9sS <a href="http://rpjeaawsdcmb.com/">rpjeaawsdcmb</a>
eigjincyd
2011/09/02 21:26
TMEB5D , [url=http://pxvfxgiatbjw.com/]pxvfxgiatbjw[/url], [link=http://gcpkduewkcfg.com/]gcpkduewkcfg[/link], http://xawthkldnhbn.com/
cvvypos
2011/09/03 19:54
CW44Qv <a href="http://qnydwuhvacqh.com/">qnydwuhvacqh</a>
トラックバック - http://topcoder.g.hatena.ne.jp/caligue/20090826
リンク元
- 3 https://www.google.com.au/
- 2 http://www.google.com/search?hl=ja&lr=&ie=UTF-8&oe=UTF-8&num=50&q=srm+447
- 1 http://twitturls.com/
- 1 http://tweetmeme.com/domain/topcoder.g.hatena.ne.jp
- 1 http://www.google.com/search?hl=en&q=topcoder+importantTasks&aq=f&oq=&aqi=
- 1 http://www.google.co.jp/search?hl=ja&lr=&ei=-A6fSqyvFo3e7AP83YXXCw&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=SRM+447+DIV+2&spell=1
- 1 http://www.google.com/search?rlz=1C1GGLS_enUS291US303&sourceid=chrome&ie=UTF-8&q="ImportantTasks"
- 1 http://www.google.cn/search?hl=zh-CN&source=hp&q=topcoder+srm+447+div2+250&btnG=Google+搜索&aq=f&oq=
- 1 http://www.google.co.jp/search?q=srm+ImportantTasks&lr=lang_ja&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:ja:official&client=firefox-a
- 1 http://www.google.com/search?hl=ja&lr=lang_ja&ie=UTF-8&oe=UTF-8&q=SRM+447&num=50