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 ...
随机推荐
- CPU die
http://en.wikipedia.org/wiki/CPU_Die Die (integrated circuit) From Wikipedia, the free encyclopedia ...
- find the longest of the shortest (hdu 1595 SPFA+枚举)
find the longest of the shortest Time Limit: 1000/5000 MS (Java/Others) Memory Limit: 32768/32768 ...
- java设计模式----真实世界的模式
设计模式的定义: 模式是在某情境下,针对某问题的某种解决方案 反模式: 告诉你如何采用一个不好的解决方案解决一个问题 要点: 1.让设计模式自然而然地出现在你的设计中,而不是为了使用而使用 2.设计模 ...
- openwrt procd
接着前面写过的一篇关于 procd 的笔记. procd 在 STATE_INIT 时会运行 /etc/inittab 中描述的几个级别指定程序. procd_inittab_run("re ...
- C++游戏系列2:角色装备武器
很多其它见:C++游戏系列文件夹 知识点:类的组合,A类的数据成员.是B类的对象,或B类的对象.做A类的数据成员 [项目-带武器的游戏角色] 设计一个武器类,其数据成员至少要有武器名.威力,还能够加上 ...
- java 的File文件
文件是计算中一种主要的数据存储形式. 首先介绍一下,绝对路径和相对路径.绝对路径是书写完整路径,相对路径是值书写文件的部分路径. d:\java\hello.java 就是据对路径.包括完整的路径d ...
- Messaging Patterns for Event-Driven Microservices
Messaging Patterns for Event-Driven Microservices https://content.pivotal.io/blog/messaging-patterns ...
- Bootstrap progress-bar
1.进度条 在网页中,进度条的效果并不少见,比如一个评分系统,比如加载状态等.就如下图所示的一个评分系统,他就是一个简单的进度条效果: 进度条和其他独立组件一样,开发者可以根据自己的需要,选择对应的版 ...
- JS是否确认提示 +页面跳转
JS友好提示 +页面跳转 function logout()...{if (confirm("你确定要注销身份吗?是-选择确定,否-选择取消"))...{window.locati ...
- Android系统开发入门
Android操作系统 Android是一个基于Linux.使用java作为程序接口的操作系统. 他提供了一些工具,比如编译器.调试器.还有他自己的仿真器(DVM — Dalvik Virtual M ...