Cod sursa(job #998939)
Utilizator | Data | 18 septembrie 2013 20:00:19 | |
---|---|---|---|
Problema | Bilute | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.36 kb |
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int i,j,k,n;
int main()
{
freopen("tije.in","r",stdin);
freopen("tije.out","w",stdout);
scanf("%d",&n);
for(k=n-1;k>=1;k--)
{
for(i=n;i>=1;i--)
for(j=1;j<=k;j++)
printf("%d %d\n",i,i+1);
for(i=1;i<=k;i++)
printf("%d 1\n",n+1);
}
return 0;
}