文件名称:main

  • 所属分类:
  • 其他小程序
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2014-03-26
  • 文件大小:
  • 1kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • zjw***
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

/*

算法训练

? 算法训练 区间k大数查询 ?

问题描述

   给定一个序列,每次询问序列中第l个数到第r个数中第K大的数是哪个。

输入格式

   第一行包含一个数n,表示序列长度。

   第二行包含n个正整数,表示给定的序列。

   第三个包含一个正整数m,表示询问个数。

   接下来m行,每行三个数l,r,K,表示询问序列从左往右第l个数到第r个数中,从大往小第K大的数是哪个。序列元素从1开始标号。

输出格式

   总共输出m行,每行一个数,表示询问的答案。

样例输入

5

1 2 3 4 5

2

1 5 2

2 3 2

样例输出

4

2

数据规模与约定

   对于30 的数据,n,m<=100;

   对于100 的数据,n,m<=1000;

   保证k<=(r-l+1),序列中的数<=106。

*/-/* Algorithm for training? Algorithms interval training large numbers k query? Problem Descr iption Given a sequence l Always ask first sequence number to the first number in a large number of r Section K is which. Input format The first line contains a number n, expressed sequence length. The second line contains a positive integer n, which means that a given sequence. The third contains a positive integer m, indicates the number of inquiry. Next m lines of three numbers l, r, K, represents the first l ask sequence from left to right number to the number in the first r, from the big to the small section K which large numbers. Sequence of elements from a start label. Total output format output m lines, each a number, which means that asking answers. Sample Input 5123452152232 Sample size and data output 42 to 30 percent of the agreed data, n, m < = 100 100 of the data, n, m < = 1000  ensure that k < = (r-l+1), the sequence number < = 106.* /
(系统自动生成,下载前可以参看下载内容)

下载文件列表





main.c

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org