2019-01-02から1日間の記事一覧

【C++】next_permutation, inner_productの練習

想定 7つお菓子がある 3つ買っていいよと言われた場合 どんな買い方と合計金額になるかを列挙 コード #include<algorithm> #include<complex> #include<ctype.h> #include<iomanip> #include<iostream> #include<map> #include<math.h> #include<numeric> #include<queue> #include<set> #include<stack> #include<stdio.h> #include<string> #include<string> #include<…</string></string></stdio.h></stack></set></queue></numeric></math.h></map></iostream></iomanip></ctype.h></complex></algorithm>

intではなくlong longで書こう (arc081_a)

intが混じっていた。WA https://atcoder.jp/contests/abc071/submissions/3913240 機械的に全てlong longにした。AC https://atcoder.jp/contests/abc071/submissions/3913253 補足 typedef long long ll; 以前、機械的にlong longにしたら遅くなってTLEした…