よじろめ覚書

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

ABC093B - Small and Large Integers

問題:B - Small and Large Integers

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

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)

int main(void) {
    int a, b, k;

    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> a >> b >> k;
    FOR(i, a, min(b, a + k - 1) + 1) {
        cout << i << "\n";
    }
    FOR(i, max(b - k + 1, a + k), b + 1) {
        cout << i << "\n";
    }
    
    return 0;
}