Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /********************
- * Problem: 3982.
- * Theme: Graphs
- */
- #include <bits/stdc++.h>
- using namespace std;
- #define int long long
- #define mp make_pair
- #define pb push_back
- #define ALL(A) A.begin(),A.end()
- #define RALL(A) A.rbegin(),A.rend()
- #define FOR(i,a,b) for(int i=(a);i<(b);i++)
- typedef vector<int> VI;
- typedef vector<pair<int,int> > VII;
- typedef vector<VI> VVI;
- const long double PI=acos(-1);
- const int INF=(int)1e18;
- const int MOD=(int)1e9+7;
- const int N = 1e3;
- int m[101][101];
- signed main()
- {
- ios::sync_with_stdio(0); cin.tie(nullptr); cout.tie(nullptr);
- //freopen("input.txt","r",stdin);
- //freopen("output.txt","w",stdout);
- //freopen("reform.in","r",stdin);
- //freopen("reform.out","w",stdout);
- int n;
- cin >> n;
- int t;
- int a;
- for(int i=0;i<n;i++)
- {
- cin >> t;
- while(t--)
- {
- cin >> a;
- m[i][a-1]=1;
- }
- }
- for(int i=0;i<n;i++)
- {
- for(int j=0;j<n;j++)
- {
- cout << m[i][j] << " ";
- }
- cout << "\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement