标签:
#include <cstdio>
using namespace std;
int main(){
int n,d,h;
scanf("%d%d%d",&n,&d,&h);
if(2 * h < d || (d == 1 && h == 1 && n != 2)) puts("-1");
else {
int cur = 2;
for(int i = 0;i < h; ++i)
printf("%d %d\n",i + 1,cur++);
for(int i = 0;i < d - h;++i,++cur)
printf("%d %d\n",i?cur-1:1,cur);
for(;cur <= n;++cur)
printf("%d %d\n",(d == h?2:1),cur);
}
return 0;
}
[2016-04-04][codeforces][639][B][Bear and Forgotten Tree 3]
标签:
原文地址:http://www.cnblogs.com/qhy285571052/p/3d816123645728ff924fffffecb582c9.html