杂记 XXXI
晚上的时候SBT分享了我一道题。

乍一看什么字都想不到。
后来我一想,这不是找四个字的词语中相同的字吗,只要我有四个字的全部词语,暴力一下不就行了。
然后我就去找词语。然后就找到了。
然后我把四个字各自的词语放到四个文件里,四层for。最后还真得出来了。
第一排的那个字应该是「道」。
我才不信有人能想得到。。
下面贴上代码(手打斜眼)
#include <cstdio>
#include <stack>
#include <list>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <functional>
#include <cstring>
#include <fstream>
#include <algorithm>
#include <istream>
#include <cctype>
#include <string>
#include <map>
#include <cmath>
using namespace std;
#define LL long long
#define ULL unsigned long long
#define SZ(x) (int)x.size()
#define Lowbit(x) ((x) & (-x))
#define MP(a, b) make_pair(a, b)
#define MS(arr, num) memset(arr, num, sizeof(arr))
#define PB push_back
#define X first
#define Y second
#define ROP freopen("input.txt", "r", stdin);
#define MID(a, b) (a + ((b - a) >> 1))
#define LC rt << 1, l, mid
#define RC rt << 1|1, mid + 1, r
#define LRT rt << 1
#define RRT rt << 1|1
#define BitCount(x) __builtin_popcount(x)
#define BitCountll(x) __builtin_popcountll(x)
#define LeftPos(x) 32 - __builtin_clz(x) - 1
#define LeftPosll(x) 64 - __builtin_clzll(x) - 1
const double PI = acos(-1.0);
const int INF = 0x3f3f3f3f;
const double eps = 1e-8;
const int MAXN = 100 + 10;
const int MOD = 1000007;
const int dir[][2] = { {-1, 0}, {1, 0}, {0, -1}, {0, 1} };
int cases = 0;
typedef pair<int, int> pii;
typedef vector<int>::iterator viti;
typedef vector<pii>::iterator vitii;
vector<string> ri, da, si, feng;
int main()
{
ifstream fin("ri.txt");
while (!fin.eof())
{
string tmp;
fin >> tmp;
ri.PB(tmp);
}
fin.close();
fin.open("da.txt", ifstream::in);
while (!fin.eof())
{
string tmp;
fin >> tmp;
da.PB(tmp);
}
fin.close();
fin.open("si.txt", ifstream::in);
while (!fin.eof())
{
string tmp;
fin >> tmp;
si.PB(tmp);
}
fin.close();
fin.open("feng.txt", ifstream::in);
while (!fin.eof())
{
string tmp;
fin >> tmp;
feng.PB(tmp);
}
fin.close();
for (int ida = 0; ida < SZ(da); ida++)
{
string ans = da[ida].substr(2, 2);
if (da[ida].substr(0, 2) != "大") continue;
for (int ifeng = 0; ifeng < SZ(feng); ifeng++)
{
string tmp = feng[ifeng].substr(2, 2);
if (tmp != "风" || feng[ifeng].substr(0, 2) != ans) continue;
for (int iri = 0; iri < SZ(ri); iri++)
{
tmp = ri[iri].substr(0, 2);
if (tmp != "日" || ri[iri].substr(2, 2) != ans) continue;
//cout << ans << endl;
for (int isi = 0; isi < SZ(si); isi++)
{
tmp = si[isi].substr(2, 2);
if (tmp != "思" || si[isi].substr(0, 2) != ans) continue;
cout << ans << endl;
}
}
}
}
return 0;
}