A. Determine Line

Water.

 1 #include <bits/stdc++.h>
 2 using namespace std;
 3 
 4 int n, vis[110];
 5 
 6 int main()
 7 {
 8     while (scanf("%d", &n) != EOF)
 9     {
10         memset(vis, 0, sizeof vis);
11         for (int i = 1, tot, x; i <= n; ++i)
12         {
13             scanf("%d", &tot);
14             while (tot--)
15             {
16                 scanf("%d", &x);
17                 ++vis[x];
18             }
19         }
20         for (int i = 1; i <= 100; ++i) if (vis[i] == n) printf("%d ", i); 
21         puts("");
22     }
23     return 0;
24 }
View Code

相关文章:

  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
  • 2022-12-23
  • 2021-06-08
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-27
  • 2021-09-18
  • 2021-07-10
  • 2021-06-29
  • 2022-01-01
  • 2022-12-23
  • 2022-01-13
相关资源
相似解决方案