Pagini recente » Cod sursa (job #3158357) | Cod sursa (job #2854423) | Cod sursa (job #2668190) | Cod sursa (job #1543493) | Cod sursa (job #2643222)
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;
typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
ifstream fin("lacate.in");
ofstream fout("lacate.out");
int n,nr;
vector<int> v[1001];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
fin>>n;
int nr=0;
for(int i=1;i<=n;i++)
for(int j=i+1;j<=n;j++)
{
nr++;
v[i].push_back(nr);
v[j].push_back(nr);
}
fout<<nr<<" "<<v[1].size()<<'\n';
for(int i=1;i<=n;i++)
{
for(auto j:v[i])
fout<<j<<" ";
fout<<'\n';
}
return 0;
}