Advertisement
a53

GrafComplet

a53
Feb 22nd, 2022
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. #define N 101
  3. using namespace std;
  4. int a[N][N];
  5.  
  6. int main()
  7. {
  8. int n,k;
  9. scanf("%d%d",&n,&k);
  10. for(int i=1;i<=n;++i,printf("\n"))
  11. for(int j=1;j<=n;++j)
  12. if(i!=j&&i%k!=j%k)
  13. printf("%d ",1);
  14. else
  15. printf("%d ",0);
  16. return 0;
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement