BNU Questions and answers
http://www.bnuoj.com/bnuoj/problem_show.php?pid=2490
#include<iostream>
#include<cstdio>
#include<algorithm> using namespace std; bool cmp(int a, int b)
{
return a<b;
} int a[100010]; int main()
{
int n,i,k;
char b[3];
while(scanf("%d",&n)!=EOF)
{
for(i = 0; i < n; i++)
{
scanf("%d",&a[i]);
}
sort(a,a+n,cmp);
scanf("%s",&b);
scanf("%d",&k);
while(k--)
{
scanf("%d",&n);
printf("%d\n",a[n-1]);
}
} return 0;
}
BNU Questions and answers的更多相关文章
- 101+ Manual and Automation Software Testing Interview Questions and Answers
101+ Manual and Automation Software Testing Interview Questions and Answers http://www.softwaretesti ...
- Top 25 Most Frequently Asked Interview Core Java Interview Questions And Answers
We are sharing 25 java interview questions , these questions are frequently asked by the recruiters. ...
- [译]Node.js Interview Questions and Answers (2017 Edition)
原文 Node.js Interview Questions for 2017 什么是error-first callback? 如何避免无止境的callback? 什么是Promises? 用什么工 ...
- 115 Java Interview Questions and Answers – The ULTIMATE List--reference
In this tutorial we will discuss about different types of questions that can be used in a Java inter ...
- 69 Spring Interview Questions and Answers – The ULTIMATE List--reference
This is a summary of some of the most important questions concerning the Spring Framework, that you ...
- 300+ Manual Testing and Selenium Interview Questions and Answers
Manual testing is a logical approach and automation testing complements it. So both are mandatory an ...
- 【译】Core Java Questions and Answers【1-33】
前言 译文链接:http://www.journaldev.com/2366/core-java-interview-questions-and-answers Java 8有哪些重要的特性 Java ...
- Oracle Purchasing QUESTIONS AND ANSWERS
Topic Summary Topic: CORRECTIONS: Corrections Topic: DELIVER: Receiving Delivery Topic: DROPSHIP: Dr ...
- Poj 2371 Questions and answers(排序)
题目链接:http://poj.org/problem?id=2371 思路分析:使用计数排序或其他时间复杂度为O( log N )的排序. 代码如下: #include <iostream&g ...
随机推荐
- CentOS环境下R语言的安装和配置
最近在看数据统计和分析,想到了R语言,于是就着手在自己的CentOS环境下进行安装和配置.步骤如下: 1.前往R官网下载安装包. 2.解压压缩包:tar xvzf R-3.2.2.tar.gz 3.进 ...
- (Problem 36)Double-base palindromes
The decimal number, 585 = 10010010012(binary), is palindromic in both bases. Find the sum of all num ...
- hibernate 持久化对象的生命周期 2.1
持久化对象的生命周期 瞬态(自由态) 表示对象在内存中存在,在数据库中没有数据相关,比如刚刚new出来的一个对象 持久态 持久态指的是持久化对象处于由Hibernate管理的状态,这种状态下持久化对象 ...
- gdb图形化调试工具总结
gdb除了命令行方式等的调试之外,还有图形化的调试工具,下面列举一些供参考 1:insight 2: ddd 3: kgdb 4: xxgdb 其它的工具欢迎补充
- SVN基础命令手册
SVN版本号:1.5 及更新版本号 名词说明: WC:Working Copy 你的工作区 Versioned:受控的:受版本号控制的 SVN是什么? SVN是开源的版本号控制系统. 比CVS很多其它 ...
- OracleDBConsoleorcl无法启动
OracleDBConsoleorcl无法启动 向左转|向右转 提问者采纳 2010-10-13 19:40 我前几天刚解决了这个问题 这个错误原因是因为你的ip是动态获取的,你在安装Oracle时 ...
- STL之Queue(Q)
STL的Queue(数据结构中的队列): 特点:FIFO 先进先出: 自适应容器(即容器适配器) 栈适配器STL queue STL中实现的Queue: 用list来实现queue: queue ...
- 写一方法计算实现任意个整数之和.在主调函数中调用该函数,实现任意个数之和。(使用params参数)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- 浏览器与服务器间的交互(客服端 <---> 服务器)
浏览器与服务器间的交互(客服端 <---> 服务器) 请求--->处理--->响应 对类HttpContext 内部成员的使用 例如 :Request .Response . ...
- iOS 常用开源代码整理
本文章不定期整理. 1.AFNetworking AFNetworking 采用 NSURLConnection + NSOperation, 主要方便与服务端 API 进行数据交换, 操作简单, 功 ...