求助!!悬关
查看原帖
求助!!悬关
742221
Happy_Doggie楼主2023/7/21 14:13
#include<iostream>
using namespace std;
typedef long long LL;
const int MX = 100000;
int n,m;
LL a[MX + 10],b[MX + 10],i,j;
int main()
{
	cin >> n >> m;
	for(i = 1;i <= n;i++)
	{
		cin >> a[i];
	}
	for(i = 1;i <= m;i++)
	{
		cin >> b[i];
	}
	for(i = 1;i <= n;i++)
	{
		for(j = 1;j <= m;j++)
		{
			if(a[i] == b[j])
			{
				cout << a[i] << " ";
			}
		}
	}
	return 0;
}

TLETLE 了,各位 dalodalo 给看一下呗

信息

2023/7/21 14:13
加载中...