3 条题解
-
1
#include<bits/stdc++.h> using namespace std; int sum[100010]; int main(){ freopen("merge.in","r",stdin); freopen("merge.out","w",stdout); int a,b; cin >> a >> b; for(int i = 0;i < a + b;i ++){ cin >> sum[i]; } sort(sum ,sum + a + b); int hui = 123456789; for(int i = 0;i < a + b;i ++){ if(hui == sum[i]) { continue; } cout << sum[i] << ' '; hui = sum[i]; } return 0; }
-
-3
#include<bits/stdc++.h> using namespace std; int sum[100010]; int main(){ freopen("merge.in","r",stdin); freopen("merge.out","w",stdout); int a,b; cin >> a >> b; for(int i = 0;i < a + b;i ++){ cin >> sum[i]; } sort(sum ,sum + a + b); int hui = 123456789; for(int i = 0;i < a + b;i ++){ if(hui == sum[i]) { continue; } cout << sum[i] << ' '; hui = sum[i]; } return 0; }
转载自鲁大师(2301026)
-
-4
#include<bits/stdc++.h> using namespace std; int amp[100010]; int main(){ freopen("merge.in","r",stdin); freopen("merge.out","w",stdout); int a,b; cin >> a >> b; for(int i = 0;i < a + b;i ++){ cin >> amp[i]; } sort(amp ,amp + a + b); int hui = 123456789; for(int i = 0;i < a + b;i ++){ if(hui == amp[i]) { continue; } cout << amp[i] << ' '; hui = amp[i]; } return 0; }
- 1
信息
- ID
- 460
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 6
- 标签
- (无)
- 递交数
- 82
- 已通过
- 25
- 上传者