daily pastebin goal
25%
SHARE
TWEET

ciorba

a guest Apr 17th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3.  
  4. void afis
  5. {
  6. for(int i=1;i<=n;i++)
  7. for(int j=1;j<=n;j++)
  8. cout<<a[i][j];
  9. }
  10.  
  11. int main()
  12. {
  13.     int i;
  14.     cin>>n;
  15.     for(i=1;i<=n;i++) cin>>t[i]
  16.     for(i=1;i<=n;i++)
  17.         if(t[i]!=0)
  18.         {
  19.         cout<<"{"<<t[i]<<","<<i<<"]";
  20.         a[i][t[i]]=a[t[i]] [i]=1;
  21.         }
  22.         cout<<endl
  23.         afis();
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top