Submission

Status:

PPPPPPPPPPPPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: Bestzu

Problemset: เมทริกซ์สมมาตร

Language: cpp

Time: 0.004 second

Submitted On: 2025-10-14 23:18:09

#include <bits/stdc++.h>
#define endl '\n'
using namespace std;

int main() {
    ios::sync_with_stdio(false); cin.tie(nullptr);

	int n; cin >> n;
	int a[210][210];
	for(int i = 0; i < n; i++) {
		for(int j = 0; j < i; j++) {
			cin >> a[i][j];
		}
	}
	
	for(int i = 0; i < n; i++) {
		for(int j = 0; j < n; j++) {
			if(i == j) cout << 0;
			else if(j < i) cout << a[i][j];
			else cout << a[j][i];
			cout << " ";
		}
		cout << endl;
	}

    return 0;
}