Submission
Status:
PPPPPPPPPPPPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Veerawich
Problemset: เมทริกซ์สมมาตร
Language: cpp
Time: 0.005 second
Submitted On: 2026-01-16 20:56:02
/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <bits/stdc++.h>
using namespace std;
// c1_su66_matrixsym - template
int main() {
int n;
cin>>n;
int arr[n][n] = {};
// รับค่าตามโจทย์
for(int i=0;i<n;i++) {
for(int j=0;j<i;j++) {
cin>>arr[i][j];
arr[j][i] = arr[i][j];
}
}
// แสดงผลทั้งหมด
for(int i=0;i<n;i++) {
for(int j=0;j<n;j++) {
cout<<arr[i][j]<<' ';
}
cout<<'\n';
}
return 0;
}