这道题我觉得是除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. JQuery上传插件Uploadify API详解

    一.相关key值介绍uploader:uploadify.swf文件的相对路径,该swf文件是一个带有文字BROWSE的按钮,点击后淡出打开文件对话框,默认值:uploadify.swf. scrip ...

  2. paxos 实现

    原文地址:http://rdc.taobao.com/blog/cs/?p=162 本文主要介绍zookeeper中zookeeper Server leader的选举,zookeeper在选举lea ...

  3. Android真机抓屏- Android Screen Monitor

    一般运行Android应用程序有两种方式一种是设置Android虚拟设备模拟器,通过Android  Virtual Manger进行管理,一种是插入USB数据线直接真机上进行调试,但是如果电脑配置比 ...

  4. int、bigint、smallint 和 tinyint

    Transact-SQL 参考 int.bigint.smallint 和 tinyint 使用整数数据的精确数字数据类型. bigint 从 -2^63 (-9223372036854775808) ...

  5. node.js在windows下的学习笔记(5)---用NODE.JS创建服务器和客户端

    //引入http模块 var http = require('http'); //调用http的createServer的方法,这个方法有一个回调函数,这个回调数 //的作用是当有请求发送给服务器的时 ...

  6. CPU相关信息

    unit untCpuInfo;interface{ 获取 CPU 制造商 }function GetCpuFactory: String;{ 获取 CPU 家族系统 }function GetCpu ...

  7. 继续推广我的新博客xysay:http://www.xysay.com/

    RT 博客收拾了一下,准备以后就在那里记录论文笔记啦,求交流,求推荐,求友链~~~ http://www.xysay.com/

  8. 如何用 PHPMailer 来发送邮件?

    <?php require_once('mantisbt-1.2.15/library/phpmailer/class.phpmailer.php'); $mail= new PHPMailer ...

  9. Oracle 通过sql profile为sql语句加hint

    sql profile最大的优点是在不修改sql语句和会话执行环境的情况下去优化sql的执行效率,适合无法在应用程序中修改sql时.sql profile最常用方法大概是:--创建产生sql tuni ...

  10. 3D分析之3D要素工具箱(转)

    来自:http://blog.csdn.net/kikitamoon/article/details/8193764 整理有关 ArcGIS 10.1 3D分析工具箱中,3D Feature 工具箱中 ...