Cod sursa(job #2643208)

Utilizator hhhhhhhAndrei Boaca hhhhhhh Data 19 august 2020 10:26:43
Problema Lacate Scor 0
Compilator cpp-64 Status done
Runda prbd1 Marime 0.71 kb
#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;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    fin>>n;
    fout<<n+1<<" "<<2<<'\n';
    for(int i=1;i<n;i++)
        fout<<i<<" "<<i+1<<'\n';
    fout<<1<<" "<<n+1;
    return 0;
}