语法排序
这篇博客我将写我学习排序的过程我会将种排序写在这篇文章底下我个人比较喜欢用题目来熟悉代码所有下面的基本会用题目来描写我在洛谷里找到了这题
【模板】排序题目描述将读入的 $N$ 个数从小到大排序后输出。
输入格式第一行为一个正整数 $N$。
第二行包含 $N$ 个空格隔开的正整数 $a_i$,为你需要进行排序的数。
输出格式将给定的 $N$ 个数从小到大输出,数之间空格隔开,行末换行且无空格。
样例 #1样例输入 #11254 2 4 5 1
样例输出 #111 2 4 4 5
提示对于 $20\%$ 的数据,有 $1 \leq N \leq 10^3$;
对于 $100\%$ 的数据,有 $1 \leq N \leq 10^5$,$1 \le a_i \le 10^9$。
没有学排序语法的我一开始看到这题我觉得,就这随随便便就打出来了好吗?
于是我提交了一个冒泡排序像下面这样。
1234567891011121314151617181920212223242526272829303132333435#include<stdio.h>int main(){ in ...
函数
简介:这是我在洛谷刷题时遇到的函数题目为了能够更好的理解这道题目我会将的解题过程书写在这篇文章里。先挖个坑后面在填(看排序)
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment