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 ...
随机推荐
- SolidEdge 如何绘制辅助视图
如果你要创建辅助视图,则点击辅助视图按钮,然后鼠标滑过要正视的面上,出现灰色的时候向上拉即可. 你可以右击箭头,点击性质,改变箭头的符号等样式.
- js跳出循环的方法区别( break, continue, return ) 及 $.each 的(return true 和 return false)
js编程语法之break语句: break语句会使运行的程序立刻退出包含在最内层的循环或者退出一个switch语句. 由于它是用来退出循环或者switch语句,所以只有当它出现在这些语句时,这种形式的 ...
- MVC上传文件并模拟进度条
进度条样式和JS <style type="text/css"> .spa { font-size: 12px; color: #0066ff; } .put { fo ...
- Vue 基础
1. data 数据 methods 方法 watch 监听变化 2. 模版指令(类似 angular) {{}} v-text 渲染数据 v-html html 结构 3. v-if v-show ...
- 未来 5 年八大热门 IT 职业
近日.外媒梳理了未来5年内.也是就是2020年仍将受到热捧的八大科技领域,为IT从业者怎样做好长远规划.有针对性地培养自身技能.又不偏离热门岗位提供了參考. (图片来自网易) 2020年将热门的8大I ...
- 获取连接状态数的awk数组命令
awk -n|more zhutianpeng@ztp-OptiPlex-:~/Icpp/server$ netstat -n|more 激活Internet连接 (w/o 服务器) Proto Re ...
- Java获取域名
private static final char URL_SPLASH = '/'; private static final String URL_SCHEME_POSTFIX = ": ...
- 十天学习PHP之第二天
学习目的:学会构建数据库 在ASP中,假设是ACCESS数据库你能够直接打开ACCESS来编辑MDB文件,假设是SQL SERVER你能够打开企业管理器来编辑SQL SERVER数据库.可是在PHP ...
- 常用到的JS 验证(包括例子)
//验证是否为空 function check_blank(obj, obj_name){ if(obj.value != ''){ retur ...
- GitExtensions 官方手册(英文)
在线版本(最新版):https://git-extensions-documentation.readthedocs.io/en/latest/ PDF版本(版本号 2.48):http://pan. ...