2018-12-21から1日間の記事一覧

XORと ==比較の優先度

cpp

answer_arc098_b.cpp:30:16: warning: ^ has lower precedence than ==; == will be evaluated first [-Wparentheses] if(a+b == a^b){ コンパイラ賢い

競プロノート ~紙 or iPad~

100円均一でA4 30枚ノートを複数買っておいている 競プロ専用としてガリガリ書いていく まとめ用ではなく、例を書いたり、思ったことを書いたりして解くときに使う 1冊目は10日で使い切った 湯水のように使ってきたつもりだったが、10日もかかっている 1日辺…

expression must have integral or unscoped enum type

C++ In my case, I use % on double // error ll num = floor(value / pow(unit, i)) % unit; // fixed ll num = (int)floor(value / pow(unit, i)) % unit;

言い換え力 B - Stone Monument abc099_b

問題 https://atcoder.jp/contests/abc099/tasks/abc099_b 提出 https://atcoder.jp/contests/abc099/submissions/3829667 振り返り 問題をちゃんと読むこと 総当たりの前に、設定を言い換えることができないか考える 雪が積もっても2本の差は変わらないこと…