当前位置:网站首页>Ccf-csp 201903-1 small, medium and large
Ccf-csp 201903-1 small, medium and large
2022-06-09 02:42:00 【Confident little screw】
Original link :CCF-CSP 201903-1 Small, medium and large 
#include <bits/stdc++.h>
using namespace std;
const int N=2010;
int main()
{
std::ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n,a;
cin>>n;
vector<int> v;
for(int i=0;i<n;i++)
{
cin>>a;
v.push_back(a);
}
sort(v.begin(),v.end());
cout<<v[n-1]<<" ";
int mid;
n/=2;
if(n&1) mid=v[n]*2;
else mid=v[n]+v[n-1];
if(mid>v[0]*2)
{
if(mid&1)
{
double mid2=mid/2.0;
cout<<setiosflags(ios::fixed)<<setprecision(1)<<mid2<<" ";
}
else cout<<mid/2<<" ";
cout<<v[0];
}
else
{
cout<<v[0]<<" ";
if(mid&1)
{
double mid2=mid/2.0;
cout<<setiosflags(ios::fixed)<<setprecision(1)<<mid2;
}
else cout<<mid/2;
}
return 0;
}
边栏推荐
- fatal error: juce_ core. h: No such file or directory
- K splitting of dynamic programming /n maximum addend K splitting of n
- Exploration and best practice of automatic verification of object acquisition technology
- In 2022, along with the Internet layoffs, the digital economy is stepping up. As a digital hub, the Internet of things platform is moving towards the trend of IOT multi system data fusion and integrat
- Dynamic programming / memo method n's K splitting n's maximum addend K splitting
- 【HomeAssistant外网访问(cpolar)】
- qt项目添加编译报错选项
- Go技術日報(2022-06-07)——go程序員開發效率神器匯總
- What are the focuses of testing, pre release and production environment testing?
- Jsnpp框架的全链式语法初探
猜你喜欢

Should flying books be ecological? Analyze the first independent SaaS case of all in flybook

FFmpeg的软、硬解码方式梳理

Blue Bridge Cup_ Multiple problem_ stack_ Remainder

Reflection principle and application in C #

From the ECS SSRF vulnerability to taking over your alicloud console

How does JVM handle exceptions? The principle that finally blocks must execute?

Leetcode 1371. Each vowel contains an even number of times the longest substring XOR + prefix and

Deux facteurs importants affectant la défaillance de togglerowselection ()

Tiflash source code reading (III) design and implementation analysis of tiflash deltatree storage engine - Part 1

Sorting out the soft and hard decoding methods of ffmpeg
随机推荐
Jerry: if the user doesn't need to use all the keys, how should other keys be set? [chapter]
Fight the high vision medical service of HKEx again, the gospel of short-sighted partners?
Doris daily function summary I
Acwing 792 high precision subtraction
(10.3)【隐写缓解】隐写防护、隐写干扰、隐写检测
Processes and threads
Summary of 14 anomaly detection methods
export相關知識
What is the hardware calculation principle of Jerry's ad value? [chapter]
Qt: get sender in slot (the control that triggers signal)
fatal error: juce_ core. h: No such file or directory
New textbook for self taught examination-p292
[untitled]
【无标题】
Blue Bridge Cup_ Diophantine equation
[homeassistant Internet access (cpolar)]
"The original, skillful and vulgar skills of cloud native" -- composition of Volume I of the national new college entrance examination in 2022
接口测试系列——转转交易业务场景接口测试实践
蓝桥杯_青蛙的约会_扩展欧几里得
C # Fundamentals