2022 ICPC 杭州站(补题记录) |
您所在的位置:网站首页 › icpc杭州站排名 › 2022 ICPC 杭州站(补题记录) |
题目顺序大致按照难度排列。 F. Da Mi Lao Shi Ai Kan De(模拟) 有0~m个群,老师在0群中,G在1~n群中,对于每个群,G需要将老师感兴趣的信息转到0群,老师感兴趣的信息指对应字符串中存在“bie”子串,按照顺序转发,且转发内容不能有重复的,输出需要转到0群的信息,若是某个群没有需要转的信息,输出那一串东西。 思路:模拟即可。 AC Code: #include typedef long long ll; typedef std::pair PII; const int N = 2e5 + 5; int t, n; int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); std::cout.tie(0); std::cin >> t; std::map mp; while(t --) { std::cin >> n; bool flag = false; for(int i = 1; i > s; for(int j = 0; j < (int)s.length() - 2; j ++) { if(s[j] == 'b' && s[j + 1] == 'i' && s[j + 2] == 'e' && !mp[s]) { flag = true; mp[s] ++; std::cout |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |