Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
440336 余逸凡 26年2月-A组(萌新)C. 菜品统计 C++ 通过 100 2 MS 252 KB 450 2026-05-10 16:40:39

Tests(10/10):


#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; int cnt[35] = {0}; for (int i = 0; i < n; i++) { int c; cin >> c; for (int j = 0; j < c; j++) { int x; cin >> x; cnt[x]++; } } int ans = 0; for (int i = 1; i <= m; i++) { if (cnt[i] == n) ans++; } cout << ans << endl; return 0; }


测评信息: