よじろめ覚書

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

ABC058B - ∵∴∵

問題:B - ∵∴∵

#include <iostream>
#include <string>
using namespace std;

#define REP(i, n) for(int i = 0; i < (n); ++i)

int main(void) {
    string o, e, ans = "";

    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> o;
    cin >> e;
    REP(i, o.length() + e.length()) {
        ans += (i % 2 == 0)? o[(i / 2) + (i % 2)] : e[(i / 2) + (i % 2) - 1];
    }

    cout << ans << "\n";
    return 0;
}