1 条题解
-
0Infinity_ LV 8 @ 2024-10-19 15:47:45
#include<iostream> using namespace std; int a[1000001], b[1001], c[1001] = {0}; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, m; cin >> n >> m; for(int i = 1; i <= n; i++)cin >> a[i]; for(int i = 1; i <= m; i++)cin >> b[i]; for(int i = 1; i <= n; i++){ for(int ii = 1; ii <= m; ii++){ if(a[i] == b[ii])c[ii]++; } } for(int i = 1; i <= m; i++)cout << c[i] << ' '; return 0; }
- 1
信息
- ID
- 2746
- 难度
- 9
- 分类
- (无)
- 标签
- 递交数
- 7
- 已通过
- 5
- 通过率
- 71%
- 上传者