摘要:
题目保证不存在两个人是同名的。 找最近公共祖先使用向上标记法。 const int N=10010; unordered_map<string,string> fa; unordered_map<string,bool> sex; int n,m; bool check(string a,strin 阅读全文
posted @ 2021-04-22 22:17
Dazzling!
阅读(137)
评论(0)
推荐(0)
摘要:
又是喜闻乐见的字符串题==。 int main() { int T; cin>>T; cin.ignore(); while(T--) { string s; getline(cin,s); vector<string> res; stringstream ss(s); string word; b 阅读全文
posted @ 2021-04-22 18:09
Dazzling!
阅读(109)
评论(0)
推荐(0)
摘要:
水题~。 int main() { string s; getline(cin,s); for(int i=0;i<s.size();i++) if(s[i] == '6') { int j=i; while(j<s.size() && s[j] == '6') j++; if(j-i > 9) c 阅读全文
posted @ 2021-04-22 17:52
Dazzling!
阅读(214)
评论(0)
推荐(0)
摘要:
水题。 int h[]={129,130}; int w[]={25,27}; int main() { int T; cin>>T; while(T--) { int sex,height,weight; cin>>sex>>height>>weight; vector<string> res; 阅读全文
posted @ 2021-04-22 14:45
Dazzling!
阅读(115)
评论(0)
推荐(0)
摘要:
水题~。 const int N=5010,M=10010; string follow[N]; unordered_set<string> S; pair<string,int> name[M]; int n,m; int main() { cin>>n; for(int i=0;i<n;i++) 阅读全文
posted @ 2021-04-22 11:45
Dazzling!
阅读(41)
评论(0)
推荐(0)