Cod sursa(job #139303)

Utilizator MirageRobert Sandu Mirage Data 19 februarie 2008 22:28:24
Problema Tije Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
#include<stdio.h>
int main () {
	int i,j,k,n;
	freopen("tije.in","r",stdin);
	freopen("tije.out","w",stdout);
	scanf("%d",&n);
	for(i=n-1;i>=1;--i){
		for(j=n;j>=1;--j)
			for(k=0;k<i;++k)
				printf("%d %d\n",j,j+1);
		for(j=0;j<i;++j)
			printf("%d %d\n",n+1,1);
	}
	return 0;
}