文章
2
粉丝
63
获赞
2
访问
8.9k
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<string.h>
#include<iostream>
#include<vector>
#include<queue>
using namespace std;
#define N 1000001
int number[2][N];
int newnumber[N];
int main()
{
int m , n;
int start1 , end1 , start2 , end2;
cin >> m >> n;
for(int j = 1 ; j <= m ;j++){
cin >> number[0][j];
}
for(int k = 1 ; k <= n ;k++){
cin >> number[1][k];
}
cin >> start1 >> end1 >> start2 >> end2 ;
int count = 1;
for(int i = start1;i <= end1; i++){
newnumber[count] = number[0][i];
count++;
}
for(int i = start2;i <= end2; i++){
newnumber[count] = number[1][i];
count++;
}
cout << newnumber[count / 2] << endl;
return 0;
}
登录后发布评论
暂无评论,来抢沙发