Cod sursa(job #253051)

Utilizator thebest001Neagu Rares Florian thebest001 Data 5 februarie 2009 13:17:03
Problema Tije Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.28 kb
#include <stdio.h>

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