よじろめ覚書

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

2019-10-09から1日間の記事一覧

ABC081B - Shift only

ABC

問題:B - Shift only #include <algorithm> #include <iostream> using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) int main(void) { const int INF = 1e9; int n, a, ans = INF; cin.tie(0); ios::sync_with_stdio(false); cin >> n; REP(i, n) { int cnt</iostream></algorithm>…

ABC081A - Placing Marbles

ABC

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