2020-02-16から1日間の記事一覧
問題: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>…
問題: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>…