Advertisement
Saleh127

Untitled

May 3rd, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. int main()
  5. {
  6. ll a[1000]={0},i,j,c,d,e=0,f,n,k;
  7. cin>>n>>k;
  8. while(k--)
  9. {
  10. cin>>c;
  11. for(i=0;i<c;i++)
  12. {
  13. cin>>d;
  14. a[d]++;
  15. }
  16. }
  17. for(i=1;i<=n;i++)
  18. {
  19. if(a[i]==0) e++;
  20. }
  21. printf("%lld\n",e);
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement