Pagini recente » Rating Bratu MIhai (Fri77z) | Monitorul de evaluare | Rating takacs Ferenc (tferenc55) | Monitorul de evaluare | Cod sursa (job #1610130)
#include <fstream>
using namespace std;
ifstream cin("lacate.in");
ofstream cout("lacate.out");
const int LIM=260;
int n, mat[LIM][LIM];
int main()
{
cin>>n;
mat[1][1]=1;
mat[2][1]=1;
int chey=2;
for(int i=3; i<=n; ++i)
for(int j=1; j<i; ++j)
mat[j][i-1]=mat[i][j]=chey, chey++;
cout<<chey-1<<' '<<n-1<<'\n';
for(int i=1; i<=n; ++i)
{
for(int j=1; j<n; ++j)
cout<<mat[i][j]<<' ';
cout<<'\n';
}
return 0;
}