This commit is contained in:
Zengtudor 2024-08-03 16:41:01 +08:00
parent 85339f6bbe
commit 03be638ba6
3 changed files with 24 additions and 4 deletions

View File

@ -1,2 +1,6 @@
# bdfu_2024_summer
# 排序
## 稳定性
>隔着老远swap一般不稳定
>稳定:插入,归并,冒泡

Binary file not shown.

View File

@ -1,17 +1,33 @@
#include <bits/stdc++.h>
using namespace std;
//DEBUG
#define PRINT_VEC(vec) {\
cout<<"\n"<<#vec<<" [";\
for (size_t i=0; i<vec.size(); i++) {\
cout<<vec[i]<<(i!=vec.size()-1?",":"]\n");\
}\
}
#define int long long
// #define p_vec(n) cout<<"n"<<endl;
const int MAX_N = 1e6+6;
int n,m,a[MAX_N],b[MAX_N];
int n,m;
signed main(){
cin>>n>>m;
for (int i=1; i<=n; i++) {
vector<int> a(n),b(n);
for (int i=0; i<n; i++) {
cin>>a[i];
}
for (int i=1; i<=n; i++) {
PRINT_VEC(a)
for (int i=0; i<n; i++) {
cin>>b[i];
}
PRINT_VEC(b)
}