Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 27th, 2012  |  syntax: C++  |  size: 0.42 KB  |  views: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.     int n;
  2.     map<string,int> users;
  3.     map<string,int> ulen;
  4.     int graph[300][300];
  5.     int idx = 0;
  6.  
  7.     cin >> n;
  8.     for(int i = 0; i < n; i++) {
  9.         for(int j = 0; j < 3; j++) {
  10.             cin >> name;
  11.             users[name] = idx;
  12.             for(int k = (j - 1); k >= 0; k--) {
  13.                 graph[j][k] = 1;
  14.                 graph[k][j] = 1;
  15.             }
  16.             idx++;
  17.         }
  18.     }