codeforces 686B B. Little Robber Girl's Zoo(水题)
题目链接:
- //#include <bits/stdc++.h>
- #include <vector>
- #include <iostream>
- #include <queue>
- #include <cmath>
- #include <map>
- #include <cstring>
- #include <algorithm>
- #include <cstdio>
- using namespace std;
- #define Riep(n) for(int i=1;i<=n;i++)
- #define Riop(n) for(int i=0;i<n;i++)
- #define Rjep(n) for(int j=1;j<=n;j++)
- #define Rjop(n) for(int j=0;j<n;j++)
- #define mst(ss,b) memset(ss,b,sizeof(ss));
- typedef long long LL;
- template<class T> void read(T&num) {
- char CH; bool F=false;
- for(CH=getchar();CH<''||CH>'';F= CH=='-',CH=getchar());
- for(num=;CH>=''&&CH<='';num=num*+CH-'',CH=getchar());
- F && (num=-num);
- }
- int stk[], tp;
- template<class T> inline void print(T p) {
- if(!p) { puts(""); return; }
- while(p) stk[++ tp] = p%, p/=;
- while(tp) putchar(stk[tp--] + '');
- putchar('\n');
- }
- const LL mod=1e9+;
- const double PI=acos(-1.0);
- const LL inf=1e18;
- const int N=(<<)+;
- const int maxn=;
- int n,x;
- int a[];
- int main()
- {
- read(n);
- for(int i=;i<=n;i++)
- {
- read(a[i]);
- }
- x=;
- while(x--)
- {
- for(int i=;i<n;i++)
- {
- if(a[i]>a[i+]){swap(a[i],a[i+]);cout<<i<<" "<<i+<<"\n";}
- }
- }
- return ;
- }
codeforces 686B B. Little Robber Girl's Zoo(水题)的更多相关文章
- Codeforces Round #359 (Div. 2) B. Little Robber Girl's Zoo 水题
B. Little Robber Girl's Zoo 题目连接: http://www.codeforces.com/contest/686/problem/B Description Little ...
- Codeforces Round #334 (Div. 2) A. Uncowed Forces 水题
A. Uncowed Forces Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/604/pro ...
- Codeforces Round #115 B. Plane of Tanks: Pro 水题
B. Plane of Tanks: Pro Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/17 ...
- Codeforces Beta Round #14 (Div. 2) A. Letter 水题
A. Letter 题目连接: http://www.codeforces.com/contest/14/problem/A Description A boy Bob likes to draw. ...
- codeforces 14A - Letter & codeforces 859B - Lazy Security Guard - [周赛水题]
就像title说的,是昨天(2017/9/17)周赛的两道水题…… 题目链接:http://codeforces.com/problemset/problem/14/A time limit per ...
- Codeforces Round #353 (Div. 2) A. Infinite Sequence 水题
A. Infinite Sequence 题目连接: http://www.codeforces.com/contest/675/problem/A Description Vasya likes e ...
- Codeforces Round #367 (Div. 2) A. Beru-taxi (水题)
Beru-taxi 题目链接: http://codeforces.com/contest/706/problem/A Description Vasiliy lives at point (a, b ...
- Codeforces Round #146 (Div. 1) A. LCM Challenge 水题
A. LCM Challenge 题目连接: http://www.codeforces.com/contest/235/problem/A Description Some days ago, I ...
- Codeforces Round #335 (Div. 2) B. Testing Robots 水题
B. Testing Robots Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://www.codeforces.com/contest/606 ...
随机推荐
- Python 双向队列Deque、单向队列Queue 模块使用详解
Python 双向队列Deque 模块使用详解 创建双向队列Deque序列 双向队列Deque提供了类似list的操作方法: #!/usr/bin/python3 import collections ...
- HTTP API 自动化测试从手工测试到平台的演变
不管是 Web 系统,还是移动 APP,前后端逻辑的分离设计已经是常态化,相互之间通过 API 调用进行数据交互.在基于 API 约定的开发模式下,如何加速请求 / 响应的 API 测试,让研发人员及 ...
- Vim command handbook
/* 本篇文章已经默认你通过了vimtuor训练并能熟练使用大部分命令.此篇文章主要是对于tutor命令的总结和梳理.适合边学习边记忆 tutor那个完全是在学习中记忆 符合认知规律但是练习有限.所以 ...
- 弹飞绵羊(bzoj 2002)
Description 某天,Lostmonkey发明了一种超级弹力装置,为了在他的绵羊朋友面前显摆,他邀请小绵羊一起玩个游戏.游戏一开始,Lostmonkey在地上沿着一条直线摆上n个装置,每个装置 ...
- make only output error/warning message( 编译时,只输出错误信息和警告信息)
make > /dev/null 这样,正常的信息被重定向输出到/dev/null,错误和警告信息会输出到标准错误设备(standard error,相对于标准输入/输出设备来说).
- Codeforces 549C The Game Of Parity【博弈】
C语言纠错大赛的一道题,正好拿来补博弈~~ 给的代码写的略奇葩..不过还是直接在上面改了.. 题目链接: http://codeforces.com/problemset/problem/549/C ...
- HashMap排序的问题
那么已知一个HashMap<Integer,User>集合, User有name(String)和 age(int)属性.请写一个方法实现对HashMap 的排序功能,该方法接收 Hash ...
- Spring Data JPA 进阶
Java持久化查询语言概述 Java持久化查询语言(JPQL)是一种可移植的查询语言,旨在以面向对象表达式语言的表达式,将SQL语法和简单查询语义绑定在一起,使用这种语言编写的查询是可移植的,可以被编 ...
- Spring中使用Log4j记录日志
以下内容引用自http://wiki.jikexueyuan.com/project/spring/logging-with-log4j.html: 例子: pom.xml: <project ...
- mysql资料整理
###SQL的语言分类 1.DQL(Data Query Language):数据查询语言 select 2.DML(Data Manipulate Language):数据操作语言 insert . ...