## A． 有序序列合并

``````#include<algorithm>
using namespace std;
int main() {
int m, n;
cin >> m >> n;
int a[2010], b[1010];
for (int i = 0; i < m; i++) {
scanf("%d", &a[i]);
}
for (int i = 0; i < n; i++) {
scanf("%d", &a[m + i]);
}
sort(a, a + m + n);
for (int i = 0; i < m + n; i++) {
cout << a[i]<<" ";
}
return 0;
}
``````

## B．Dragon：

``````#include<cstdio>
#include<algorithm>
using namespace std;
bool cmp(int a, int b) {
return a > b;
}
int main() {
int a[5];
while (cin >> a[0]) {
for (int i = 1; i < 4; i++) {
cin >> a[i];
}
sort(a, a + 4, cmp);

int sum = 0;
for (int i = 0; i < 4; i++) {
sum = sum * 10 + a[i];
}
cout << sum<<endl;
}
return 0**;**
}
``````

## C．花样方阵：

``````#include<algorithm>
using namespace std;
int main() {
int T;
cin >> T;
while (T--) {
int n;
int a[110][5];
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < 4; j++) {
cin >> a[i][j];
}
}
int b[110];
int max = 0;
for (int i = 0; i < n; i++) {
b[i] = abs(a[i][2] - a[i][0]) + abs(a[i][3] - a[i][1]);
if (max < b[i])max = b[i];
}
cout << max<<endl;
}
1. 	return 0;
}
``````

## D.不重复数字：

``````#include<iostream>
#include<unordered_set>
#include<cstdio>
using namespace std;
unordered_set<int>st;
int main() {
int T, n , x;
cin >> T;
while (T--) {
st.clear();
cin >> n;
for (int i = 0; i < n; i++) {
scanf("%d", &x);
if (st.find(x) == st.end()) {
cout << x <<" ";
st.insert(x);
}
}
cout << endl;
}
return 0;
}
``````

## E.小H和迷宫

``````#include<bits/stdc++.h>
using namespace std;
int main() {
long long n;
double a[4];
cin>>n>>a[1]>>a[2]>>a[3];
long long nn=n;
sort(a+1,a+4);
for (int i = 3; i > 0; i--) {
nn = nn - nn*a[i]/100;
}
printf("%lld\n",n-nn);
return 0;
}
``````