Mispelling4
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.
output with the following values: The dataset number as a decimal integer (start
counting at one), a space, and the misspelled word. The misspelled word is the
input word with the indicated character deleted.
Sample Input
#include <stdio.h>
#include <string.h> int main(){
int T;
int n;
char s[];
int length;
int time;
int i; time=; scanf("%d",&T); while(T--){
scanf("%d%s",&n,s);
length=strlen(s); printf("%d ",time);
time++; for(i=;i<length;i++){
if(i+!=n)
printf("%c",s[i]);
} printf("\n"); } return ;
}
Mispelling4的更多相关文章
- (erase) Mispelling4 hdu1984
Mispelling4 Time Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total ...
- HDOJ/HDU 1984 Mispelling4(删除第n个字符~)
Problem Description Misspelling is an art form that students seem to excel at. Write a program that ...
随机推荐
- Dagger学习笔记
@Inject 提供依赖的构造函数,或者需要依赖的成员变量 @Module 提供依赖,实例化的地方( 使用module实例化,方便测试的时候替换成其他对象,而这也是和构造方法注入的区别,如果用构造方法 ...
- <转载>linux下内存泄露查找、BUG调试
先收藏着,抽空好好看看:http://www.ibm.com/developerworks/cn/linux/l-pow-debug/ 简介 调试程序有很多方法,例如向屏幕上打印消息,使用调试器,或者 ...
- Unity2D Keynote
[Unity2D Keynote] 1.File Format Accepted by Unity 2.By double-clicking an object in Hierachy, you no ...
- Java对信号的处理
本文主要包括Java如何处理信号,直接上代码. 1. 实现SignalHandler package com.chzhao.SignalTest; import sun.misc.*; @Suppre ...
- POJ2947Widget Factory(高斯消元解同模方程)
http://poj.org/problem?id=2947 题目大意:有n 种装饰物,m 个已知条件,每个已知条件的描述如下:p start enda1,a2......ap (1<=ai&l ...
- ]用EnumChildWindows遍历窗口的方法
最近项目有需要,得到一个非自己实现的窗口控件对象.于是想起曾经做过类似功能.总结如下: 调用EnumChildWindows(this->m_hWnd, EnumChildProc, NULL) ...
- 结构类模式(一):适配器(Adapter)
定义 适配器模式把一个类的接口变换成客户端所期待的另一种接口,从而使原本因接口不匹配而无法在一起工作的两个类能够在一起工作. 类适配器模式 使用继承的方式实现没有提供的接口从而达到适配到新系统的需求. ...
- Oracle的体系结构
前言 这个章节主要想说的是Oracle的体系结构,这个也是理论强些.还有一些比较理论的知识点(比如表空间啊),就暂时先不写了,下一章节开始进入Oracle的操作阶段,比如表的查询啊.插入以及重点是和S ...
- 28.怎样在Swift中实现单例?
1.回忆一下OC中的单例实现 //AFNetworkReachabilityManager中的单例,省略了其他代码 @interface AFNetworkReachabilityManager : ...
- org.apache.catalina.mbeans.ServerLifecycleListener
Tomcat 启动报错: java.lang.ClassNotFoundException: org.apache.catalina.mbeans.ServerLifecycleListener at ...