POJ的题目都是英文的,所以,,,还是直接贴代码吧

#include<stdio.h>
int main(){
int x,y,z;
int n,nm,max; scanf("%d",&n);
while(n--){ int num[60]={0}; scanf("%d",&nm); for(x = 0;x < nm; x++){
scanf( "%d",&y);
num[ y+x+1 ]=1;
} for(x = 0;x <= 2*nm; x++)
{
if( num[x])
{
z = num[x];
for(y = x-1; y > 0; y--)
{
if( !num[y] ) z--;
else z++;
if( z<=0 ) break;
}
printf("%d ",(x-y+1)/2);
}
}
printf("\n");
}
return 0;
}

版权声明:本文为博主原创文章,未经博主允许不得转载。

POJ 1068 AC 2014-01-07 15:24 146人阅读 评论(0) 收藏的更多相关文章

  1. strtok函数 分类: c++ 2014-11-02 15:24 214人阅读 评论(0) 收藏

    strtok函数是cstring文件中的函数 strtok函数是cstring文件中的函数 其功能是截断字符串 原型为:char *strtok(char s[],const char *delin) ...

  2. Codeforces821C Okabe and Boxes 2017-06-28 15:24 35人阅读 评论(0) 收藏

    C. Okabe and Boxes time limit per test 3 seconds memory limit per test 256 megabytes input standard ...

  3. 安装hadoop1.2.1集群环境 分类: A1_HADOOP 2014-08-29 15:49 1444人阅读 评论(0) 收藏

    一.规划 (一)硬件资源 10.171.29.191 master 10.173.54.84  slave1 10.171.114.223 slave2 (二)基本资料 用户:  jediael 目录 ...

  4. Basic 分类: POJ 2015-08-03 15:49 3人阅读 评论(0) 收藏

    Basic Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 905 Accepted: 228 Description The p ...

  5. Hardwood Species 分类: POJ 树 2015-08-05 16:24 2人阅读 评论(0) 收藏

    Hardwood Species Time Limit: 10000MS Memory Limit: 65536K Total Submissions: 20619 Accepted: 8083 De ...

  6. Doubles 分类: POJ 2015-06-12 18:24 11人阅读 评论(0) 收藏

    Doubles Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 19954   Accepted: 11536 Descrip ...

  7. Gold Coins 分类: POJ 2015-06-10 15:04 16人阅读 评论(0) 收藏

    Gold Coins Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 21767   Accepted: 13641 Desc ...

  8. hdu2602 Bone Collector(01背包) 2016-05-24 15:37 57人阅读 评论(0) 收藏

    Bone Collector Problem Description Many years ago , in Teddy's hometown there was a man who was call ...

  9. Find The Multiple 分类: 搜索 POJ 2015-08-09 15:19 3人阅读 评论(0) 收藏

    Find The Multiple Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 21851 Accepted: 8984 Sp ...

随机推荐

  1. XenApp简单部署

    作者:MR.Yangwj 目录 XenApp简单部署... 1 一.         XenApp安装... 1 (一)      服务器配置任务... 9 1)     许可证服务器配置... 9 ...

  2. Swift学习链接

    http://wiki.jikexueyuan.com/project/swift/chapter1/02_a_swift_tour.html

  3. Windows7下安装搭建Ngnix教程和配置详解

    作者:Sungeek 出处:http://www.cnblogs.com/Sungeek/ 欢迎转载,也请保留这段声明.谢谢! 简介: Nginx ("engine x") 是一个 ...

  4. vs2010 配置OpenGL

    为了之后的项目学习,需要学习OpenGL.在此进行下记录,方便查询. 准备工作: 到https://www.opengl.org/resources/libraries/glut/glutdlls37 ...

  5. USB接口介绍

        USB设备系统分为两个部分,USB Host端和USB Device端,以USB接口的U盘为例子,U盘自身是一个USB Device,PC机的USB接口以及相关的控制电路为USB Host部分 ...

  6. 新做的H5页面(具体应该说是百分比页面)

    主要代码 <div class="top" id="headTab"> <div id="photo"><a ...

  7. 【Qt】Qt Creator介绍【转】

    简介 Qt Creator是使用Qt开发的IDE.Qt支持Windows.Linux/Unix.Mac OS X.Android.BlackBerry.QNX等多种平台,Qt Creator为不同平台 ...

  8. jquery hover事件冒泡解决方法

    $(this).hover(function(event){    $(this).addClass("cur");    event.stopPropagation();     ...

  9. Amazon S3 PHP Class Documentation

    API : http://undesigned.org.za/2007/10/22/amazon-s3-php-class/documentation Example: http://www.phpb ...

  10. 第一个leapmotion的小游戏

    自从看过leapmotion的宣传视频,就被吸引住了.觉得这东西迟早要替代鼠标,然后关注了一年多leapmotion的动态,终于在今年8月份入手了一只.//675大洋啊,心疼~ 一直想写份评测,一直想 ...