Cod sursa(job #1879088)

Utilizator GoogalAbabei Daniel Googal Data 14 februarie 2017 18:26:44
Problema Tije Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.45 kb
#include <bits/stdc++.h>
#define nm 101

using namespace std;

ifstream fin("tije.in");
ofstream fout("tije.out");

int n;

int main()
{
    int i,j,k;
    fin>>n;
    fin.close();
    for(i=n-1;i>0;i--)
    {
        for(j=n;j>0;j--)
        {
            for(k=1;k<=i;k++)
                fout<<j<<' '<<j+1<<'\n';
            for(k=1;k<=i;k++)
                fout<<n+1<<' '<<i<<'\n';
        }
    }
    fout.close();
    return 0;
}