首页 > ACM题库 > HDU-杭电 > hdu 1984 Mispelling4待解决[解题报告]C++
2013
12-26

hdu 1984 Mispelling4待解决[解题报告]C++

Mispelling4

问题描述 :

Misspelling is an art form that students seem to excel at. Write a program that removes the nth character from an input string.

输入:

The first line of input contains a single integer N, (1 ≤ N ≤ 1000) which is the number of datasets that follow.
Each dataset consists of a single line of input containing M, a space, and a single word made up of uppercase letters only. M will be less than or equal to the length of the word. The length of the word is guaranteed to be less than or equal to 80.

输出:

The first line of input contains a single integer N, (1 ≤ N ≤ 1000) which is the number of datasets that follow.
Each dataset consists of a single line of input containing M, a space, and a single word made up of uppercase letters only. M will be less than or equal to the length of the word. The length of the word is guaranteed to be less than or equal to 80.

样例输入:

4
4 MISSPELL
1 PROGRAMMING
7 CONTEST
3 BALLOON

样例输出:

1 MISPELL
2 ROGRAMMING
3 CONTES
4 BALOON


  1. 站长,你好!
    你创办的的网站非常好,为我们学习算法练习编程提供了一个很好的平台,我想给你提个小建议,就是要能把每道题目的难度标出来就好了,这样我们学习起来会有一个循序渐进的过程!

  2. 有一点问题。。后面动态规划的程序中
    int dp[n+1][W+1];
    会报错 提示表达式必须含有常量值。该怎么修改呢。。