Codeforces Round #473 (Div. 2), problem: (C) Mahmoud and Ehab and the wrong algorithm Solution In C/C++
#include<stdio.h> int main(){ int n; scanf(“%d”,&n); if(n <= 5) printf(“-1\n”); else{ printf(“1 2\n2 3\n2 4\n”); for(int i = 5;i <= n;i++) printf(“1 %d\n”,i); } for(int i = 2;i <= n;i++) printf(“1 %d\n”,i); }