Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
23496 | U•ェ•*✔ | 【二分】眼红的Medusa | C++ | 解答错误 | 1 MS | 272 KB | 315 | 2023-07-15 16:34:24 |
#include"bits/stdc++.h" using namespace std; int n,m,ans=0; int x[100005],y[100005],s[100005]; int main(){ cin>>n>>m; for(int i=0;i<n;i++)cin>>x[i]; for(int i=0;i<m;i++)cin>>y[i]; sort(x,x+n); sort(y,y+m); for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ if(x[i]==y[j])cout<<y[j]<<' '; } } }