Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream fin("graf.in");
- ofstream fout("muchii.txt");
- int n, a[51][51];
- int main() {
- fin >> n;
- for (int i = 1; i <= n; i++) {
- for (int j = 1; j <= n; j++) {
- fin >> a[i][j];
- }
- }
- for (int i = 1; i < n; i++) {
- for (int j = i + 1; j <= n; j++) {
- if (a[i][j]) {
- cout << i << ' ' << j << endl;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement