Cod sursa(job #778420)

Utilizator danalex97Dan H Alexandru danalex97 Data 14 august 2012 17:48:23
Problema Tije Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.31 kb
#include <cstdio>
using namespace std;

int main()
{
	freopen("tije.in","r",stdin);
	freopen("tije.out","w",stdout);
	
	int N; scanf("%d",&N);
	for(int i=N-1;i>0;--i)
	{
		for(int j=N;j>0;--j)
			for(int k=1;k<=i;k++)
				printf("%d %d\n",j,j+1);
		for(int k=1;k<=i;++k)
			printf("%d 1\n",N+1);
	}
}