ABC141A - Weather Prediction
#include <algorithm> #include <iostream> #include <iterator> #include <string> #include <vector> using namespace std; #define ALL(c) (c).begin(), (c).end() int main(void) { vector<string> weather = {"Sunny", "Cloudy", "Rainy"}; string s; cin.tie(0); ios::sync_with_stdio(false); cin >> s; cout << weather[(distance(weather.begin(), find(ALL(weather), s)) + 1) % 3] << "\n"; return 0; }