よじろめ覚書

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

ABC146A - Can't Wait for Holiday

問題:A - Can't Wait for Holiday

#include <algorithm>
#include <iostream>
#include <iterator>
#include <string>
#include <vector>
using namespace std;

#define ALL(c) (c).begin(), (c).end()

int main(void) {
    const vector<string> WEEKDAY = {"SUN", "MON", "TUE", "WED" , "THU", "FRI", "SAT"};
    string s;

    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> s;
    cout << 7 - distance(WEEKDAY.begin(), find(ALL(WEEKDAY), s)) << "\n";
    return 0;
}