首页 > 其他 > 详细

CodeForces615A-Bulbs-

时间:2016-02-22 14:44:39      阅读:228      评论:0      收藏:0      [点我收藏+]

水题

 1 #include <cstdio>
 2 #include <algorithm>
 3 
 4 using namespace std;
 5 
 6 int N,M,save[1000];
 7 
 8 int main()
 9 {
10     scanf("%d%d",&N,&M);
11     for(int i=0,t,tt;i<N;i++)
12     {
13         scanf("%d",&t);
14         for(int j=0;j<t;j++)
15         {
16             scanf("%d",&tt);
17             save[tt] = 1;
18         }
19     }
20     for(int i=1;i<=M;i++)
21     {
22         if(save[i] == 0)
23         {
24             printf("NO\n");
25             return 0;
26         }
27     }
28     printf("YES\n");
29     return 0;
30 }

 

CodeForces615A-Bulbs-

原文:http://www.cnblogs.com/helica/p/5206852.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!