这道题我觉得是除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. 按要求编写Java程序: (1)编写一个接口:InterfaceA,只含有一个方法int method(int n); (2)编写一个类:ClassA来实现接口InterfaceA,实现int method(int n)接口方 法时,要求计算1到n的和; (3)编写另一个类:ClassB来实现接口InterfaceA,实现int method(int n)接口 方法时,要求计算n的阶乘(n!);

    package com.homework2; public class ClassA implements InterfaceA { @Override public int method(int n ...

  2. Xcode repository host is unreachable

    遇到这个错误,首先不要急.按照如下方法即可(如果你的svn地址没有问题的话): url要使用域名,所以映射下 1. 修改host:在应用程序里面打开终端(terminal),输入 sudo vi /e ...

  3. BZOJ 2150: 部落战争 最大流

    2150: 部落战争 Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://www.lydsy.com/JudgeOnline/problem.php? ...

  4. Clover

    为您的 Windows Explorer 插上翅膀! Clover 是 Windows Explorer 资源管理器的一个扩展,为其增加类似谷歌 Chrome 浏览器的多标签页功能. 方便的 Tab ...

  5. 用java开发的网站或者程序

    中国移动的官网即其相关业务系统 阿里巴巴.淘宝网 58同城是java做的后台 铁道部12306 腾讯的拍拍网等 各大银行的交互应用系统,比如有的信用卡网银 另外,Android手机的大部分应用,其他智 ...

  6. How to Use Custom TTF Font on iOS

    Cocos2d-x uses FontLabel to draw customer ttf font before v2.0.3(including v2.0.3). Now it uses UIFo ...

  7. Routing and controllers

    Routing and controllers We will build a very simple inventory system to display our album collection ...

  8. iOS 并发概念浅析

    在进行iOS开发过程中,我们常会遇到网络请求.复杂计算.数据存取等比较耗时的操作,如果处理不合理,将对APP的流畅度产生较大影响.除了优化APP架构,并发(concurrency)是一个常用且较好的解 ...

  9. felx第二天 ActionScript 基本语法和关键字

    flex中使用的注解有两种分别是:// 和/**/ flex使用的关键字如图

  10. CentOS内核升级

    CentOS 6.5自动内核升级的主要步骤: 1)内核文件下载到/usr/src/kernel/目录下: 如:2.6.32-431.5.1.el6.x86_64编译后差不多有48M大小: 2)生成的引 ...