/* -*- coding: utf-8 -*- * * 2098.cc: No.2098 [Cherry Alpha *] Introduction - yukicoder */ #include #include #include using namespace std; /* constant */ const int N = 5; const int MAX_L = 128; const char ts[N][MAX_L] = { "Zelkova and Cherry", "BANNED CONTEST", "Stray Bullet", "Early Summer Rain", "Do you know Cherry Contest?", }; const char nms[N][MAX_L] = { "1st", "2nd", "3rd", "4th", "Alpha" }; /* typedef */ /* global variables */ /* subroutines */ /* main */ int main() { char s[MAX_L]; fgets(s, MAX_L, stdin); int n = strlen(s); for (int i = n - 1; i >= 0 && s[i] < ' '; i--) s[i] = '\0'; for (int i = 0; i < N; i++) if (! strcmp(s, ts[i])) { puts(nms[i]); break; } return 0; }