2020-08-01から1日間の記事一覧

B. Heaters

Quiz https://codeforces.com/contest/1066/problem/B AC https://codeforces.com/contest/1066/submission/88626668 解説 editorialがないので書いておく 各ライトが照らせる範囲を[left, right]として持っておき、左のライトから点けるべきか判定していく …

Rating History 解いた問題数の履歴を取り始めた

カウンター (old) Rating Historyというサービスがあり、解いた問題数が分かる https://rating-history.herokuapp.com/index.html?handle_topcoder=peroon&handle_codeforces=peroon&handle_atcoder=peroon&handle_aoj=peroon&handle_yukicoder=peroon&handl…

G. Guest Student

Quiz https://codeforces.com/problemset/problem/1089/G AC https://codeforces.com/contest/1089/submission/88624066 解説 どの曜日から開始すれば最速に課題を終えられるかという問題。7種類しかないので、7パターン全ての場合で何日かかるか求めてminを…

vectorのrotate 使い方

rotate(first, middle, last); middleの要素が先頭、middle-1の要素が末尾となるように、 [first,last)の要素の並びを回転させる。 https://cpprefjp.github.io/reference/algorithm/rotate.html void rotate_test(){ VI A = {1,2,3,4,5,6,7}; // 左に1つシ…

E. Polycarp's New Job

Quiz https://codeforces.com/contest/1101/problem/E AC https://codeforces.com/contest/1101/submission/88614755 解法 お札は方向を揃えて入れましょう 私は縦を短く、横を長くするようにした これdifficulty 1500はないでしょう。1300程度かな。Div2でE…