Submission
Status:
PPPPPPPPPPPPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Zailagend1
Problemset: เมทริกซ์สมมาตร
Language: cpp
Time: 0.005 second
Submitted On: 2026-06-20 01:04:00
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef vector<pii> vpii;
typedef vector<string> vs;
typedef unordered_map<int, int> umii;
typedef unordered_map<ll, ll> umll;
typedef unordered_set<int> usi;
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define sz(v) (int)(v).size()
const int MOD = 1e9 + 7;
const int INF = 1e9;
const ll LINF = 1e18;
template<typename T> void _dbg(T t) { cerr << t; }
template<typename T, typename... Args> void _dbg(T t, Args... args) { cerr << t << ", "; _dbg(args...); }
#ifdef LOCAL
#define debug(...) do { cerr << "[" << #__VA_ARGS__ << "] = ["; _dbg(__VA_ARGS__); cerr << "]" << endl; } while(0)
#else
#define debug(...)
#endif
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int a;
cin >> a;
vvi n(a,vi(a,0));
for (int i = 0; i < a; i++){
for(int j = 0;j<i;j++){
if(i == j){n[i][j] = 0;continue;}
cin >> n[j][i];
}
}
for (int i = 0; i < a; i++){
for(int j = 0;j<a;j++){
n[j][i] = n[i][j];
}
}
for (int i = 0; i < a; i++){
for(int j = 0;j<a;j++){
cout << n[i][j] << " ";
}
cout << '\n';
}
return 0;
}