hdu-2673-shǎ崽 OrOrOrOrz(水题)
注意输出格式
#include <iostream>
#include <algorithm>
using namespace std;
int arr[+];
int main() {
int n;
while (cin>>n) {
for (int i=; i<n; i++) cin>>arr[i];
sort(arr, arr+n);
cout<<arr[n-];
for (int i=; i*<n-; i++) {
if (n-i- == i){
cout<<" "<<arr[i];
continue;
}
cout<<" "<<arr[i]<<" "<<arr[n-i-];
}
cout<<endl;
}
return ;
}
hdu-2673-shǎ崽 OrOrOrOrz(水题)的更多相关文章
- HDU 2673 shǎ崽 OrOrOrOrz
#include <cstdio> #include <algorithm> using namespace std; int main() { int n; while (s ...
- [acm]HDOJ 2673 shǎ崽 OrOrOrOrz
题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=2673 拍两次序,交替输出 #include<iostream> #include< ...
- hdu 2671 shǎ崽 OrOrOrOrz(排序)
题意:排序后按题目要求输出 思路:排序 #include<iostream> #include<stdio.h> #include<algorithm> using ...
- HDU 5578 Friendship of Frog 水题
Friendship of Frog Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.ph ...
- HDU 5590 ZYB's Biology 水题
ZYB's Biology Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid ...
- HDU 5538 L - House Building 水题
L - House Building Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.ph ...
- HDU2673:shǎ崽 OrOrOrOrz
Problem Description Acmer in HDU-ACM team are ambitious, especially shǎ崽, he can spend time in Inter ...
- hdu 1005:Number Sequence(水题)
Number Sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)T ...
- hdu 1018:Big Number(水题)
Big Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total ...
随机推荐
- 剑指offer 面试63题
面试63题 题目:股票的最大利润 题:假设把某股票的价格按照时间先后顺序存储在数组中,请问买卖该股票一次可获得的最大利润是多少?例如,一只股票在某些时间节点的价格为{9,11,8,5,7,12,16, ...
- 系统架构师考试——程序计数器 PC, 指令寄存器IR、状态寄存器SR、通用寄存器GR
● 计算机执行程序时,在一个指令周期的过程中,为了能够从内存中读指令操作码,首先是将__(9)___的内容送到地址总线上. (9)A.程序计数器PC B.指令寄存器IR C.状态寄存器SR ...
- 在英文Windows操作系统上使用SQL Server Management Studio(SSMS)导入Excel 97-2003文件时报错:Failure creating file
今天在公司服务器上使用SQL Server Management Studio(SSMS)导入Excel 97-2003文件(.xls)时报错: Failure creating file. (Mic ...
- css的继承性理解
1) 所有的text 相关属性都被继承: 如 font-family font-size; font-style;font-weight;font;font-variant;letter-spacin ...
- public,protected,privat区别
关于从基类继承来的方法和属性的保护: --class Pig:public Animal {...} C++不仅允许你对在类里定义的方法和属性实施访问控制,还允许你控制子类可以访问基类里的哪些方法和属 ...
- php任务管理器 —— Jobby
通过一个主crontab任务去维护别的任务 自定义的计划任务完全由PHP编写 任务的执行计划时间表设置与crontab的时间表设置语法一致 在指定的时间内只会运行一个任务 邮件告警异常退出任务 在ro ...
- java经典30笔试题
1. 下面哪些是Thread类的方法() A start() B run() C exit() D getPriority() 答案:ABD 解析:看Java AP ...
- Go 书单
一.<Go语言学习笔记> (未找到对应版本的电子书,大家可以去作者github:https://github.com/qyuhen/book) 推荐理由:作为时下流行的一种系统编程语言,G ...
- poj 3414 Pots【bfs+回溯路径 正向输出】
题目地址:http://poj.org/problem?id=3414 Pots Time Limit: 1000MS Memory Limit: 65536K Total Submissions ...
- java.sql.SQLException: Incorrect string value: '\xF0\x9F\x91\x88\xE6\x88...' for column 'content' at row 1
往MySQL插入数据时,报错如下 java.sql.SQLException: Incorrect at com.mysql.cj.jdbc.exceptions.SQLError.createSQL ...