Pagini recente » lista-lui-wefgef/clasament | Cod sursa (job #2877877) | Cod sursa (job #3278345) | Cod sursa (job #2538804) | Cod sursa (job #2469893)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("lacate.in");
ofstream fout("lacate.out");
int n, k;
vector < int > v[257];
int main()
{
fin >> n;
fout << n * (n - 1) / 2 << ' ' << n - 1 << '\n';
for (int i = 1; i < n; ++i)
for (int j = i + 1; j <= n; ++j)
v[i].push_back(k), v[k].push_back(k), ++k;
for (int i = 1; i <= n; ++i) {
for (int j : v[i])
fout << j << ' ';
fout << '\n';
}
return 0;
}