よじろめ覚書

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

ABC104A - Rated for Me

問題:A - Rated for Me

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

int getRatedContest(int x_r) {
    if (x_r < 1200) {
        return 0;
    } else if (x_r < 2800) {
        return 1;
    } else {
        return 2;
    }
}
int main(void) {
    int r;
    const string contest[3] = {"ABC", "ARC", "AGC"};

    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> r;
    cout << contest[getRatedContest(r)] << "\n";
    return 0;
}