よじろめ覚書

私の理解度重視のソースコードです。

2019-11-05から1日間の記事一覧

ABC095B - Bitter Alchemy

ABC

問題:B - Bitter Alchemy #include <algorithm> #include <iostream> using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) int main(void) { const int INF = 1 << 30; int n, x, m, sum = 0, min_m = INF; cin.tie(0); ios::sync_with_stdio(false); cin >> </iostream></algorithm>…

ABC095A - Something on It

ABC

問題:A - Something on It #include <iostream> #include <string> using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) int main(void) { int amt = 700; string s; cin.tie(0); ios::sync_with_stdio(false); cin >> s; REP(i, s.length()) { if (s[i] =</string></iostream>…