Permutation Forger(思维)
https://codeforces.com/contest/1405/problem/A
根据题目相邻的反序一下就好了。倒序输出即可。
#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=200;
typedef long long LL;
LL a[maxn];
int main(void)
{cin.tie(0);std::ios::sync_with_stdio(false);LL t;cin>>t;while(t--){LL n;cin>>n;for(LL i=1;i<=n;i++) cin>>a[i];for(LL i=n;i>=1;i--) cout<<a[i]<<" ";cout<<endl; }
return 0;
}
Permutation Forger(思维)相关推荐
- Harbour.Space Scholarship Contest 2021-2022 E. Permutation Shift 思维 + 剪枝
传送门 文章目录 题意: 思路: 题意: 给你一个初始排列[1,2,3,...,n][1,2,3,...,n][1,2,3,...,n],你可以选择一个kkk,将这个排列循环右移kkk次,让后最多交换 ...
- 【CodeForces - 483C】Diverse Permutation(思维构造)
题干: Permutation p is an ordered set of integers p1, p2, ..., pn, consisting of ndistinct posit ...
- Permutation(构造+思维)
A permutation p is an ordered group of numbers p1, p2, ..., pn, consisting of ndistinct positi ...
- Gym - 102394I Interesting Permutation(思维)
题目链接:https://vjudge.net/contest/398708#problem/I DreamGrid has an interesting permutation of 1,2,-,n ...
- CodeForces - 1284C New Year and Permutation(组合数学+思维)
题目链接:点击查看 题目大意:首先定义名词"排列"的意思是,一段数列中的数字升序排序后可以组成连续的一段数列,换句话说,满足一段区间内的最大值-最小值=r-l则称这个区间的数列为& ...
- Obtain a Permutation(思维)
You are given a rectangular matrix of size n×mn×m consisting of integers from 11 to 2⋅1052⋅105. In o ...
- 狂补dp Atcoder Educational DP Contest(全)
狂补dp Atcoder Educational DP Contest(全) 注意 为了减少篇幅,本博客代码部分只放主代码部分,其余省略快读.快输.头文件等代码,即把代码看做伪代码更佳 A - Fro ...
- Permutation Partitions CodeForces - 1326C(组合数学+思维)
You are given a permutation p1,p2,-,pn of integers from 1 to n and an integer k, such that 1≤k≤n. A ...
- Restoring Permutation CodeForces - 1315C(思维)
You are given a sequence b1,b2,-,bn. Find the lexicographically minimal permutation a1,a2,-,a2n such ...
最新文章
- UILabel 使用 标签,圆角,富文本
- LINQ之路 2:C# 3.0的语言功能(上)
- 如何调整SAP HANA studio里的字体大小
- GLSL学习教程博客
- 建立单链表 单链表的插入_单链列表插入
- hosts文件 端口_在Linux系统中使用Vim读写远程文件
- oracle 审计(二)
- dapper 多对多查询对象和对象列表
- 题目552-小数阶乘-nyoj20140811
- 查看嵌入式设备的CPU频率
- 帮你快速拿Offer!java基础入门课后答案第二版
- mysql中delete,truncate,drop区别
- 二叉树前中后/层次遍历的递归与非递归形式(c++)
- 解决问题--Maven,IDEA项目External Libraries下只有jdk没有maven依赖
- kubernetes failed to start sandbox
- chrome插件开发详解
- html怎么控制文字的行数,CSS3属性 line-clamp控制文本行数的使用
- c++ map查找key
- linux服务器运维管理学习
- 基于zookeeper3.4.6的源码研究(三)