1510[Mispelling]
2013-10-17 16:52
316 查看
Description
Misspelling is an art form that students seem to excel at. Write a program that removes the n th character from an input string.***********************************************************
看例子马上就明白了
Sample Input
4 4 MISSPELL 1 PROGRAMMING 7 CONTEST 3 BALLOON
Sample Output
1 MISPELL 2 ROGRAMMING 3 CONTES 4 BALOON
代码:
#include<iostream> #include<string> using namespace std; int main() { string w; int n, m; cin >> n; int count = 1; while( n-- ) { cin >> m >> w; cout << count << " "; for(int i = 0; i < w.length(); i++) if( i != m-1 ) cout << w[i]; cout << endl; count++; } // system("pause"); return 0; }
相关文章推荐
- 1510. Mispelling
- 1510. Mispelling
- sicily 1510. Mispelling
- 1510. Mispelling
- ural 1510
- 题目1510:替换空格
- 剑指Offers 题目1510:替换空格
- 倒着处理的思维--包含字符串匹配和九度1510 替换空格 剑指offer03
- M8100-Table T169P: entry 1510 does not exist
- wust oj 1510 最长连续不下降序列
- 题目1510:替换空格-九度
- 题目1510:替换空格
- 九度oj-剑指offer-题目1510:替换空格
- [九度OnlineJudge][剑指Offer]题目1510:替换空格
- csu 1510 Happy Robot(字符串DP,记忆化搜索)
- BZOJ 1510: [POI2006]Kra-The Disks
- [九度剑指offer] 1510
- Uva 1510 - Neon Sign 解题报告(计数)
- BZOJ1510: [POI2006]Kra-The Disks
- BZOJ 1510 [POI2006]Kra-The Disks 二分