主包也是直接暴力
主包洛谷名: nmy2013
上代码
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; if (s.size() < 9) { if (s.size() % 2 == 1)cout << "xiaoa wins."; else cout << "uim wins."; } else{ int flag = 0,book[10]={0}; for (int i = 0; i < s.size(); i++)if (i % 2 == 0)book[s[i] - '0'] = 1; //开始暴力 if (book[1] == 1 && book[2] == 1 && book[3] == 1)flag = 1; if (book[4] == 1 && book[5] == 1 && book[6] == 1)flag = 1; if (book[7] == 1 && book[8] == 1 && book[9] == 1)flag = 1; if (book[1] == 1 && book[5] == 1 && book[9] == 1)flag = 1; if (book[3] == 1 && book[5] == 1 && book[7] == 1)flag = 1; if (book[1] == 1 && book[4] == 1 && book[7] == 1)flag = 1; if (book[2] == 1 && book[5] == 1 && book[8] == 1)flag = 1; if (book[3] == 1 && book[6] == 1 && book[9] == 1)flag = 1; if (flag)cout << "xiaoa wins."; else cout << "drew."; } return 0; }