codeforces round #201 Div2 A. Difference Row
#include <iostream>
#include <vector>
#include <algorithm> using namespace std; int main(){
int n;
cin >> n;
vector<int> a(n);
for(int i = ; i < n; ++ i ) cin >>a[i];
sort(a.begin(),a.end());
swap(a[],a[n-]);
for(int i = ; i < n; ++i) cout<<a[i]<<" ";
cout<<endl;
return ;
}
codeforces round #201 Div2 A. Difference Row的更多相关文章
- Codeforces Round #539 div2
Codeforces Round #539 div2 abstract I 离散化三连 sort(pos.begin(), pos.end()); pos.erase(unique(pos.begin ...
- 【前行】◇第3站◇ Codeforces Round #512 Div2
[第3站]Codeforces Round #512 Div2 第三题莫名卡半天……一堆细节没处理,改一个发现还有一个……然后就炸了,罚了一啪啦时间 Rating又掉了……但是没什么,比上一次好多了: ...
- Codeforces Round#320 Div2 解题报告
Codeforces Round#320 Div2 先做个标题党,骗骗访问量,结束后再来写咯. codeforces 579A Raising Bacteria codeforces 579B Fin ...
- Codeforces Round #564(div2)
Codeforces Round #564(div2) 本来以为是送分场,结果成了送命场. 菜是原罪 A SB题,上来读不懂题就交WA了一发,代码就不粘了 B 简单构造 很明显,\(n*n\)的矩阵可 ...
- Codeforces Round #361 div2
ProblemA(Codeforces Round 689A): 题意: 给一个手势, 问这个手势是否是唯一. 思路: 暴力, 模拟将这个手势上下左右移动一次看是否还在键盘上即可. 代码: #incl ...
- Codeforces Round #626 Div2 D,E
比赛链接: Codeforces Round #626 (Div. 2, based on Moscow Open Olympiad in Informatics) D.Present 题意: 给定大 ...
- CodeForces Round 192 Div2
This is the first time I took part in Codeforces Competition.The only felt is that my IQ was contemp ...
- Codeforces #Round 632 div2 A~C
A. Little Artem Young boy Artem tries to paint a picture, and h ...
- codeforces Round#380 div2
1.字符串替换ogo+go…换成*** 思路:找ogo记录g位置,做初步替换和标记,非目标字母直接输出, 间隔为2的判断是否一个为标记g,一个为非标记做***替换 #include<iostre ...
随机推荐
- POJ 矩阵相乘 (随机化算法-舍伍德(Sherwood))
周三的算法课,主要讲了随机化算法,介绍了拉斯维加斯算法,简单的理解了为什么要用随机化算法,随机化算法有什么好处. 在处理8皇后问题的时候,穷举法是最费时的,回朔比穷举好点,而当数据量比较大的时候,如1 ...
- tomcat配置文件之Server.xml
Server.xml包含的元素有<Server>.<Service>.<Connector>.<Engine>.<Host>.<Con ...
- Ubuntu 16.04 安装 VMware-Workstation-12
以前一直使用 Ubuntu + Virtaulbox ,最近测试了 VMware-Workstation-9,性能超过 Virtaulbox-4.2.x,下面是详细步骤: 1 首先准备一个Ubuntu ...
- PHP随笔
php(PHP开发) PHP(外文名: Hypertext Preprocessor,中文名:“超文本预处理器”)是一种通用开源脚本语言.语法吸收了C语言.Java和Perl的特点,易于学习,使用广泛 ...
- 默认hosts后面为files dns
售后工程师 : 您好,问题已经解决,问题原因是您修改了/etc/nsswitch.conf配置文件中的hosts:这项导致的,默认hosts后面为files dns,但是后面去掉了DNS导致直接使用本 ...
- Android自定义Dialog
Android开发过程中,常常会遇到一些需求场景——在界面上弹出一个弹框,对用户进行提醒并让用户进行某些选择性的操作, 如退出登录时的弹窗,让用户选择“退出”还是“取消”等操作. Android系统提 ...
- MVC数据验证
深入浅出 MVC 数据验证 2.0 [附演示源码] 今天在这里给大家介绍一下MVC的数据验证框架. 在1.0版中,很多朋友提出了怎么使用客户端验证,今天找了一些资料,发现了客户端验证的方法. 1.MV ...
- 使用ajax解决ie缓存问题
1.在XMLHttpRequest/发送的请求之前 加上 XMLHttpRequest.setRequestHeader("If-Modified-Since","0&q ...
- WPF 打印控件 无弹框打印。
WPF中打印用到了 PrintDialog类. 其中设置打印属性的是PrintTicket,管理打印机的是PrintQueue. 实例如下: public class PrintDialogHelpe ...
- js监听密码输入框type
1.密码输入框 <input class="oaInput oaText" type="text" placeholder="请输入用户名&qu ...