Result: Accepted
Time: 33ms
Memory: 1756kB
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <stack>
#include <vector>
#include <string>
#include <iostream>
#include <list>
#include <cstdlib>
#include <bitset>
#define lowbit(x) (x&(-x))
#define lson root<<1,l,mid
#define rson root<<1|1,mid+1,r
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
const int inf = 0x3f3f3f3f;
using namespace std;
int fib[30];
void init()
{
fib[1] = 1;
for (int i = 2; i < 30; ++i)
fib[i] = fib[i - 1] + fib[i - 2];
}
int main()
{
int n;
init();
while (scanf("%d", &n) != EOF)
{
if (binary_search(fib, fib + 30, n))
puts("mwy win");
else
puts("sjy win");
}
}