首页 > 其他分享 >oj 1093

oj 1093

时间:2022-12-10 19:35:38浏览次数:46  
标签:std sort oj 1093 int cin

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n,d;  
  cin>>n>>d;        
  int a[n+1];
  for(int i=0;i<n;i++){
    cin>>a[i];
  }

  sort(a,a+n);

  cout<<a[n-d];
  return 0;
}

标签:std,sort,oj,1093,int,cin
From: https://www.cnblogs.com/jianyuzhi/p/16972146.html

相关文章

  • oj 1057
    #include<bits/stdc++.h>usingnamespacestd;intmain(){ intn; cin>>n; inta[n],x,s=0; for(inti=0;i<n;i++){ cin>>a[i]; } cin>>x; for(inti=0;i<n;i++){ ......
  • oj 1058
    #include<iostream>#include<algorithm>usingnamespacestd;intmain(){ intn; cin>>n; inta[n+1],b[n+1]; for(inti=1;i<=n;i++)cin>>a[i]; sort(a+1,a+n+1); in......
  • [POJ1734]Sightseeing 观光之旅 题解
    无向图的最小环问题,前置芝士:\(\text{Floyd}\)传送门题目描述给定一张无向图,求图中一个至少包含\(3\)个点的环,环上的节点不重复,并且环上的边的长度之和最小。你需要......
  • 自然语言处理nlp小姜机器人(闲聊) nlp_xiaojiang-996station GitHub鉴赏官
    OverridetheentrypointofanimageIntroducedinGitLabandGitLabRunner9.4.Readmoreaboutthe extendedconfigurationoptions.Beforeexplainingtheav......
  • Maven - oracle ojdbc jar包报错:Could not find artifact com.oracle:ojdbc8
    oracleojdbcjar包报错:Couldnotfindartifactcom.oracle:ojdbc8 在IDEA中引入一个新项目时,由于项目中引入了如下依赖:<dependency><groupId>c......
  • echarts map地图中绘制浙江省市区县乡镇多级联动边界下钻的最新geojson数据文件获取和
    目录EChartsMap地图的显示GeoJSON数据文件获取在ECharts中绘制浙江省的数据EChartsMap地图的显示ECharts支持地理坐标显示,专门提供了一个geo组件,在setOption中提供opti......
  • TZOJ 7331: 旅游 广搜+深搜
    描述  给定一个n*m的地图,每个方格可以取:(1)“*”:表示一个景点;(2)“#”:表示墙壁,不可经过;(3)“.”:表示通道,可以经过;现在你从左上角(0,0)出发,需要走遍每个景点......
  • buuoj-[HDCTF2019]Maze
    1.winexe32bitupx1使用脱壳工具这一段是红的,是ida没有为其创建函数堆栈报错的问题,其上一条命令就是常规的动态运算反调试,40102E+1=40102F,在2F处重新生成代码即......
  • The story of a typical software project.
    ACMEWidgetshadaproblem.Thesystemtheyhadbeenusingtomanagetheinventoryoftheirwidgetswasnotdesignedforthetypeofvolumethey’dgrowntopro......
  • 遭遇 Trojan.Win32.KillFiles.m, Packer.Mian007等
    遭遇Trojan.Win32.KillFiles.m,Packer.Mian007等endurer原创2007-09-18第1版刚才一位网友说他的电脑最近启动很慢,让偶通过QQ远程协助检查。下载pe_xscan扫描log并分......