よじろめ覚書

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

2020-02-16から1日間の記事一覧

ABC154B - I miss you...

ABC

問題:B - I miss you... #include <iostream> #include <string> using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) int main(void) { string s; cin.tie(0); ios::sync_with_stdio(false); cin >> s; REP(i, s.length()) { cout << "x"; if (i == s.len</string></iostream>…

ABC154A - Remaining Balls

ABC

問題:A - Remaining Balls #include <iostream> #include <string> using namespace std; int main(void) { string s, t, u; int a, b; cin.tie(0); ios::sync_with_stdio(false); cin >> s >> t; cin >> a >> b; cin >> u; if (s == u) { --a; } else { --b; } cout << a << </string></iostream>…