这道题我觉得是除1000(A-B)外最简单的题了……不过还是提出一个小问题:在本机用gcc编译的时候我没包括string.h头文件,通过编译,为什么在sicily上却编译失败?

1510. Mispelling

限制条件

时间限制: 1 秒, 内存限制: 32 兆

题目描述

Misspelling is an art form that students seem to excel at. Write a program that removes the n <tex2html_verbatim_mark>th character from an input string.

输入格式

The first line of input contains a single integer N <tex2html_verbatim_mark>, (1≤N≤1000) <tex2html_verbatim_mark>which is the number of datasets that follow.

Each dataset consists of a single line of input containing M <tex2html_verbatim_mark>, a space, and a single word made up of uppercase letters only. M <tex2html_verbatim_mark>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.

输出格式

For each dataset, you should generate one line of 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.

样例输入

4
4 MISSPELL
1 PROGRAMMING
7 CONTEST
3 BALLOON

样例输出

1 MISPELL
2 ROGRAMMING
3 CONTES
4 BALOON

题目来源

Greater New York 2007

#include<stdio.h>
//#include<string.h>
int main()
{
int N,count=;
scanf("%d",&N);
while(N--){
int M,i;
char str[];
scanf("%d %s",&M,str);
int len=strlen(str);
for(i=M-;i<len;i++) str[i]=str[i+];
str[len]='\0';
printf("%d %s\n",count,str);
count++;
}
return ;
}

Sicily 1510欢迎提出优化方案的更多相关文章

  1. Sicily 1068欢迎提出优化方案

    1608. Digit Counting 限制条件 时间限制: 1 秒, 内存限制: 32 兆 题目描述 Trung is bored with his mathematics homeworks. ...

  2. sicily 1200欢迎提出优化方案

    水题来的……我的做法是用a[10]数组表示每个数字出现的次数. 1200. Stick 限制条件 时间限制: 1 秒, 内存限制: 32 兆 题目描述 Anthony has collected a ...

  3. iOS界面跳转的一些优化方案

    原文地址: http://blog.startry.com/2016/02/14/Think-Of-UIViewController-Switch/ iOS界面跳转的一些优化方案 App应用程序开发, ...

  4. (转)Web性能优化方案

    第一章 打开网站慢现状分析 在公司访问部署在IDC机房的VIP网站时会感觉很慢.是什么原因造成的?为了缩短页面的响应时间,改进我们的用户体验,我们需要知道用户的时间花在等待什么东西上. 可以跟踪一下我 ...

  5. AngularJS应用页面切换优化方案

    葡萄城的一款尚在研发中的产品,对外名称暂定为X项目.其中使用了已经上市的Wijmo中SpreadJS产品,另外,在研发过程中整理了一些研发总结分享给大家.如本篇的在页面切换的过程中优化方案,欢迎大家跟 ...

  6. AngularJs应用页面切换优化方案(转)

    目录[-] 前言 场景 使用resolve来提前请求数据 为页面加入切换动画 总结 葡萄城的一款尚在研发中的产品,对外名称暂定为X项目.其中使用了已经上市的wijmo中SpreadJS产品,另外,在研 ...

  7. Adapter优化方案的探索

    概要:使用Adapter的注意事项与优化方案本文的例子都可以在结尾处的示例代码连接中看到并下载,如果喜欢请star,如果觉得有纰漏请提交issue,如果你有更好的点子可以提交pull request. ...

  8. Web性能优化方案

    第一章 打开网站慢现状分析 在公司访问部署在IDC机房的VIP网站时会感觉很慢.是什么原因造成的?为了缩短页面的响应时间,改进我们的用户体验,我们需要知道用户的时间花在等待什么东西上. 可以跟踪一下我 ...

  9. 大批量delete 优化方案

    超过100万以上数据 删除的时候 会非常慢且产生大量日志文件 最大的问题是内存爆表 导致得多次重启服务才能删除整个库 暂时提出初步优化方案 1.设置日志为简单模式,处理完后恢复 ALTER DATAB ...

随机推荐

  1. SQLite使用教程8 Insert 语句

    http://www.runoob.com/sqlite/sqlite-insert.html SQLite Insert 语句 SQLite 的 INSERT INTO 语句用于向数据库的某个表中添 ...

  2. hadoop 1.2 集群搭建与环境配置

    一.虚拟机环境 见我的另一篇博客http://www.cnblogs.com/xckk/p/6000881.html, 需要安装JDK环境,centos下安装JDK可参考: http://www.ce ...

  3. 教你50招提升ASP.NET性能(二):移除不用的视图引擎

    (2)Remove unused View Engines 招数2: 移除不用的视图引擎 If you're an ASP.NET MVC developer, you might not know ...

  4. struts中的helloword(1)

    注:文章中的所有图片均在附件中明白表明   首先要安装jdk1.6以及tomcat6和myeclipse 对于这些配置的安装 这里不再细细说明  其次是下载struts2  第一步:去struts21 ...

  5. 理解shared_ptr<T> ---2

    1.引用计数字段不能放在资源管理类中.我们的解决办法是,把引用计数和资源绑在一起,进行二次封装.但是这样存在一个大问题,不同类型的资源管理类不能兼容.也就是说,shared_ptr<Dog> ...

  6. linux下web压力测试工具ab使用及详解

    APACHE自带的测试工具AB(apache benchmark).在APACHE的bin目录下.格式: ./ab [options] [http://]hostname[:port]/path参数: ...

  7. Introdution to 3D Game Programming With DirectX11 第11章 习题解答

    11.1 这道题要注意使用了line strip,由于曾经一直用triangle list,所以在几何渲染的时候easy算错定点描绘的顺序. 贴一些代码,大概就能把这个问题解释清楚了,由于框架还不是特 ...

  8. #pragma warning 启用和禁用warning

    开发人员可以使用 #pragma 指令将警告作为错误处理:还可以启用或禁用警告,如下面的示例所示: 1.将一个warning作为一个错误 #pragma warning (error: 6260) 2 ...

  9. G711

    G.711就是语音模拟信号的一种非线性量化.细分有二种:G.711 a-lawand G.711 u-law.不同的国家和地方都会选取一种作为自己的标准. G.711a/u bitrate 是64kb ...

  10. LINUX系统备份

    LINUX系统备份 =========================================================== 作者: gswwgph(http://gswwgph.itp ...