ZOJ 3960: What Kind of Friends Are You?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ZOJ 3960: What Kind of Friends Are You?相关的知识,希望对你有一定的参考价值。
What Kind of Friends Are You?
///@author Sycamore, ZJNU ///@date 4/22/2017 #include <iostream> #include <sstream> #include <iomanip> #include <cmath> #include <string> #include <algorithm> #include <numeric> #include <functional> #include <vector> #include <set> #include <list> #include <stack> #include <queue> #include <map> #include <algorithm> #include <cctype> #include<fstream> //#define cin fin //#define cout fout //ifstream fin("in.txt"); //ofstream fout("out.txt"); using namespace std; typedef vector<int> VI; typedef pair<int, int> PII; int main() { ios::sync_with_stdio(false); int T; cin >> T; while (T--) { int n, q, c; cin >> n >> q >> c; vector<string>fr(c); for (auto &e : fr)cin >> e; vector<vector<short>>ans(c); for (auto &e : ans)e.resize(q); for (int i = 0; i < q; i++) { int m; cin >> m; string s; for (int j = 0; j < m; j++) { cin >> s; ans[find(begin(fr), end(fr), s) - fr.begin()][i] = 1; } } for (int i = 0; i < n; i++) { vector<short> v(q); for (int j = 0; j < q; j++) cin >> v[j]; if (count(ans.begin(), ans.end(), v) == 1)cout << fr[find(ans.begin(), ans.end(), v) - ans.begin()] << endl; else cout << "Let‘s go to the library!!\n"; } } return 0; }
以上是关于ZOJ 3960: What Kind of Friends Are You?的主要内容,如果未能解决你的问题,请参考以下文章
ZOJ 3960: What Kind of Friends Are You?
2017浙江省赛 C - What Kind of Friends Are You? ZOJ - 3960
ZOJ What Kind of Friends Are You?
浙江省赛C What Kind of Friends Are You?(MAP)
论文阅读 | What Does BERT Learn about the Structure of Language?