Cod sursa(job #185142)
Utilizator | Data | 24 aprilie 2008 20:11:28 | |
---|---|---|---|
Problema | Tije | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include <cstdio>
int main()
{
freopen("tije.in","r",stdin);
freopen("tije.out","w",stdout);
int i,j, k,n;
scanf("%d", &n);
for(i=n-1; i>=1 ;--i)
{
for(j=n; j>=1;--j)
for(k=1;k<=i;++k)printf("%d %d\n", j, j+1);
for(j=1;j<=i;++j) printf("%d %d\n", n+1, 1);
}
return 0;
}