about summary refs log tree commit diff
path: root/usth/MATH2.3/2/adjmat2edges.cc
blob: d9cf14ffe1c2f65682390a78408ca9349e30961a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>

using namespace std;

int
main ()
{
  size_t n;
  int b;
  cin >> n;
  for (size_t i = 0; i < n; ++i)
    for (size_t j = 0; j < n; ++j)
      {
        cin >> b;
        if (i <= j && b > 0)
          cout << i << " " << j << " " << b << endl;
      }
}