Codeforces Round #473 (Div. 2), problem: (C) Mahmoud and Ehab and the wrong algorithm Solution In C/C++

By |2018-04-18T13:24:16+00:00April 18th, 2018|Categories: C/C++, Programming|Tags: , , , , , , |

#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); }

Codeforces Round #377 (Div. 2), problem: (B) Cormen — The Best Friend Of a Man Solution in C++

By |2017-04-07T22:11:51+00:00October 17th, 2016|Categories: C/C++, Programming|Tags: , , , , , |

Hi guys , I just solved the Codeforces Round #377 (Div. 2), problem: (B) Cormen --- The Best Friend Of a Man, hope you like it . You are most welcome to submit any other solution . include using namespace std; int main() { [...]