POJ2371【水题】
mdzz…
wa了一发,没看清题意,真是智障
//#include <bits/stdc++.h>
#include<iostream>
#include<string.h>
#include<cstdio>
#include<algorithm>
using namespace std;
typedef __int64 LL;
const int N=1e5+10;
int a[N];
int main()
{
char ss[10];
int num;
// while(1)
// {
// scanf("%s",ss);
// if(strcmp(ss,"###")==0)
// break;
// int len=strlen(ss);
// int x=0;
// for(int i=0;i<len;i++)
// x=x*10+ss[i]-'0';
// a[num++]=x;
// }
scanf("%d",&num);
for(int i=0;i<num;i++)
scanf("%d",&a[i]);
scanf("%s",ss);
sort(a,a+num);
int k;
scanf("%d",&k);
while(k--)
{
int bb;
scanf("%d",&bb);
printf("%d\n",a[bb-1]);
}
return 0;
}
POJ2371【水题】的更多相关文章
- HDOJ 2317. Nasty Hacks 模拟水题
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Tota ...
- ACM :漫漫上学路 -DP -水题
CSU 1772 漫漫上学路 Time Limit: 1000MS Memory Limit: 131072KB 64bit IO Format: %lld & %llu Submit ...
- ytu 1050:写一个函数,使给定的一个二维数组(3×3)转置,即行列互换(水题)
1050: 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 154 Solved: 112[ ...
- [poj2247] Humble Numbers (DP水题)
DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The se ...
- gdutcode 1195: 相信我这是水题 GDUT中有个风云人物pigofzhou,是冰点奇迹队的主代码手,
1195: 相信我这是水题 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 821 Solved: 219 Description GDUT中有个风云人 ...
- BZOJ 1303 CQOI2009 中位数图 水题
1303: [CQOI2009]中位数图 Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 2340 Solved: 1464[Submit][Statu ...
- 第十一届“蓝狐网络杯”湖南省大学生计算机程序设计竞赛 B - 大还是小? 字符串水题
B - 大还是小? Time Limit:5000MS Memory Limit:65535KB 64bit IO Format: Description 输入两个实数,判断第一个数大 ...
- ACM水题
ACM小白...非常费劲儿的学习中,我觉得目前我能做出来的都可以划分在水题的范围中...不断做,不断总结,随时更新 POJ: 1004 Financial Management 求平均值 杭电OJ: ...
- CF451C Predict Outcome of the Game 水题
Codeforces Round #258 (Div. 2) Predict Outcome of the Game C. Predict Outcome of the Game time limit ...
- CF451B Sort the Array 水题
Codeforces Round #258 (Div. 2) Sort the Array B. Sort the Array time limit per test 1 second memory ...
随机推荐
- [WASM + Rust] Debug a WebAssembly Module Written in Rust using console.log
Having some kind of debugging tool in our belt is extremely useful before writing a lot of code. In ...
- Visual Studio VS2013模块对于SAFESEH 映像是不安全的 怎么办
打开该项目的"属性页"对话框,会出现如下界面打开该项目的"属性页"对话框,会出现如下界面 然后单击"链接器"--"命令行&qu ...
- gulp配置 - PC
初始化目录结构如下(图片看不清可以拖到桌面或者直接CTRL+鼠标滚轮进行观看) 开发环境示例: 上线环境示例: gulpfile.js(详解版) (2018-3-28)添加了scss处理(去除了les ...
- python—networkx:依据图的权重绘图
首先输入边和边的权重,随后画出节点位置.依据权重大小划分实边和虚边 #coding:utf-8 #!/usr/bin/env python """ An example ...
- JAVA设计模式之单例模式(转)
本文继续介绍23种设计模式系列之单例模式. 概念: java中单例模式是一种常见的设计模式,单例模式的写法有好几种,这里主要介绍三种:懒汉式单例.饿汉式单例.登记式单例. 单例模式有以下特点: 1.单 ...
- SDIO总线(一)
SDIO接口是在SD内存卡接口的基础上发展起来的接口.SDIO接口兼容曾经的SD内存卡.而且能够连接SDIO接口的设备. SDIO1.0标准定义了两种类型的SDIO卡: 1.全速的SDIO卡.传输率能 ...
- 【LeetCode从零单排】No 114 Flatten Binary Tree to Linked List
题目 Given a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 5 / \ \ 3 4 ...
- 传奇的诞生,PHP三位创始人简介
PHP到现在为止已经诞生12年了.在这期间它经过不断改善,已经成为Web开发最重要的语言之一.PHP能有今天这样的成就,它的3位创始人(Rasmus Lerdorf.Zeev Suraski和Andi ...
- innodb 乐观插入因空间不够导致失败,进入悲观插入阶段,这个空间的大小限制
btr_cur_optimistic_insert{ ... /*检查分裂页时是否有足够的空间预留给未来记录的update*/ if (leaf && !zip_size && ...
- Redis java使用
直接应用redis.clients:jedis的jar包到项目中,然后直接就可以使用,具体对五种类型的数据操作方法,可以翻代码找到. 连接到 redis 服务 实例 import redis.clie ...