codeforces 之 C. String Manipulation 1.0
来源:互联网 发布:iphone同步软件 编辑:程序博客网 时间:2024/05/16 12:46
看到这个表情你就知道这道题是个大水题了,如果你收索这道题的答案不幸又收索到了我,请别骂我,这道题真的很水,你之所以感觉到难,估计是一些刷题“神器”你不怎么了解,通过我你了解下,不用对我说谢,请叫我雷锋;
题意不解释,自己看,自己分析,代码如下:
#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
using namespace std;
string s,s1;
vector< vector<int> > ve(30);
int main() {
int k,n,a,i;
char c;
cin>>k;
cin>>s;
cin>>n;
for(i=0; i<30; i++) ve[i].clear();
for(i=0; i<k; i++) {
s1+=s;
}
for(int j=0; j<s1.size(); j++) {
ve[s1[j]-'a'].push_back(j);
}
for(i=0; i<n; i++) {
cin>>a>>c;
s1[ve[c-'a'][a-1]] = '0';
ve[c-'a'].erase(ve[c-'a'].begin()+a-1);
}
for(i=0; i<s1.size(); i++)
if(s1[i]!='0') cout<<s1[i];
cout<<endl;
return 0;
}
0 0
- codeforces 之 C. String Manipulation 1.0
- H CodeForces 159C String Manipulation 1.0
- B - String Manipulation 1.0-CodeForces 159C
- 【CodeForces 159C】String Manipulation 1.0(字符串处理)
- CF 159C String Manipulation 1.0
- VK Cup 2012 Qualification Round 2 C. String Manipulation 1.0
- String Manipulation
- vector—— String Manipulation 1.0
- Java String Manipulation
- Bash string manipulation
- String Manipulation - strtok
- Codeforces #848C: String Reconstruction 题解之花样虐题
- FFMPEG学习【libavutil】:String Manipulation
- Codeforces 797C-Minimal string
- CodeForces 828C String Reconstruction
- Codeforces 828 C String Reconstruction
- codeforces 828C. String Reconstruction
- CodeForces 797C Minimal string
- Openstack Juno on CentOS7
- 使用 HTML5 Boilerplate 开始 web 开发
- 【高清】全套arm 2440教学【视频教程】
- poj3974 Palindrome 字符串
- 笔试中常用的计算公式,排列与组合
- codeforces 之 C. String Manipulation 1.0
- ubuntu14.04 禁用unity
- windows xp 环境下安装theano
- TableTree4J的全结点展开, 显示居中以及Array.prototype
- 涉足计算机视觉领域要知道的~ (part2)
- Share folder or printer without password in Windows 7
- COM技术内幕 读书笔记——第一章 组件
- C++ primer 第五版 中文版 练习 12.19 个人code
- spring的xml配置与annotation注解混合