Problem B: 零起点学算法92——元素前移1位
#include<stdio.h>
int main()
{
int n,a[],b[];
while(scanf("%d",&n)!=EOF)
{
for(int i=;i<n;i++)
{
scanf("%d",&a[i]);
} for(int i=;i<n;i++)
{
b[i-]=a[i];
}
b[n-]=a[]; for(int i=;i<n-;i++)
{
printf("%d ",b[i]);
}
printf("%d\n",b[n-]);
}
return ;
}
Problem B: 零起点学算法92——元素前移1位的更多相关文章
- Problem H: 零起点学算法103——查找最大元素
#include<stdio.h> #include<string.h> int main() { ]; while(gets(a)!=NULL) { ]; ;a[i]!='\ ...
- Problem A: 零起点学算法91——找出一个数组中出现次数最多的那个元素
#include<stdio.h> int main() { ],b[]={}; while(scanf("%d",&n)!=EOF) { ;i<n;i+ ...
- Problem B: 零起点学算法81——找出数组中最大元素的位置(下标值
#include<stdio.h> int main(void) { ],i,max; while(scanf("%d",&n)!=EOF) { ;i<n ...
- 1185: 零起点学算法92——单词数(C)
一.题目 http://acm.wust.edu.cn/problem.php?id=1185&soj=0 二.分析 统计的是不同的单词数,即重复的单词只统计一次: 多组输入: 每行不超过10 ...
- Problem H: 零起点学算法109——单数变复数
#include <stdio.h> #include<string.h> int main(void) { int n; ]; scanf("%d",&a ...
- Problem G: 零起点学算法106——首字母变大写
#include<stdio.h> #include<string.h> int main(void) { ]; int i,k; while(gets(a)!=NULL) { ...
- Problem D: 零起点学算法95——弓型矩阵
#include<stdio.h> #include<string.h> int main() { ][]; while(scanf("%d%d",& ...
- Problem F: 零起点学算法42——多组测试数据输出II
#include<stdio.h> int main() { ; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { ...
- Problem E: 零起点学算法34——3n+1问题
#include<stdio.h> #include<math.h> int main() { int n; n<=pow(,); ; scanf("%d&qu ...
随机推荐
- 【目录】Python模块学习系列
目录:Python模块学习笔记 1.Python模块学习 - Paramiko - 主机管理 2.Python模块学习 - Fileinput - 读取文件 3.Python模块学习 - Confi ...
- Style2Paints:用AI技术为线稿快速上色的工具(GitHub 3310颗星)
python 开源项目: Style2Paints:用AI技术为线稿快速上色的工具(GitHub 3310颗星) https://github.com/lllyasviel/style2paints
- [session篇]看源码学习session(一)
假如你是使用过或学习过PHP,你一定觉得很简单.session只不过是$_SESSION就可以搞得,这还不简单只是对一个key-value就能工作了.我觉得可以大多数的phper都是这样的,这是语言本 ...
- PBFT算法的相关问题
PBFT(99.02年发了两篇论文)-从开始的口头算法(指数级)到多项式级 要求 n>3f why: 个人简单理解:注意主节点是可以拜占庭的,从节点对于(n,v,m)的投票最开始也是基于主节点给 ...
- atom编辑器插件atom-ternjs
这是官方文档:https://atom.io/packages/atom-ternjs 官方介绍: JavaScript code intelligence for atom with Tern. A ...
- Every Tom,Dick and Harry. 不管张三李四。
1 every adj 每个,最大的,所有的,一切的 Every other girl except me is wearing jeans. 除了我之外的每个女孩都穿着牛仔裤. I have ...
- 数据库索引(Index)【未完待续】
数据库索引是啥?有什么用?原理是什么?最佳实践什么? 索引是啥 一个索引是这样的数据结构:从数据上来说,不仅包含了从表中某一列或多列的数据拷贝,同时,还包含了指向这列数据行的链接: 从结构上来说,索引 ...
- Centos7Yum安装配置指定版本nginx
1.安装 rpm -ivh http://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.14.2-1.el7_4.ngx.x86_64.rpm 2.启 ...
- 【转】kubernetes 中 deployment 支持哪些键值
这个比较全,可以参考 ================= https://www.addops.cn/post/kubernetes-deployment-fileds.html ========== ...
- Go语言基础单元测试示例
这个要熟悉原理,要能写.. 但现在..... 注意,没有main函数,以_test.go结尾,命令go test -v package main import ( "testing" ...