Skip to main content

Posts

All Solution Code of CodeChef May Long Challenge 2021

competitve programming solution here...

solution code of Golf problem number-2 of may long challenge codechef

Golf Problem Code: LKDNGOLFSolvedSubmit Read problem statements in Bengali, Mandarin Chinese, Russian, and Vietnamese as well. It's a lockdown. You’re bored in your house and are playing golf in the hallway. The hallway has N+2 tiles numbered from 0 to N+1 from left to right. There is a hole on tile number x. You hit the ball standing on tile 0. When you hit the ball, it bounces at lengths of k, i.e. the tiles covered by it are 0,k,2k,…, and so on until the ball passes tile N+1. If the ball doesn't enter the hole in the first trial, you try again but this time standing on the tile N+1. When you hit the ball, it bounces at lengths of k, i.e. the tiles covered by it are (N+1),(N+1−k),(N+1−2k),…, and so on until the ball passes tile 0. Find if the ball will enter the hole, either in its forward journey or backward journey. Note: The input and output of this problem are large, so prefer using fast input/output methods. Input The first line contains an integer T, the number of test ...

solution code of Solubility problem number-1 of may long challenge codechef

Solubility Problem Solution Code: CodeChef Solution Code #include   <bits/stdc++.h> using   namespace   std ; #define   int   long   long   int #define   endl   " \n " int32_t   main () {      int  t;     cin  >>  t;      while  (t -- )     {          int  p, x, y;         cin  >>  p  >>  x  >>  y;          int  ans  =   0 ;         ans  =  x  +  ( 100   -  p)  *  y;         ans  =  ans  *   10 ;         cout  <<  ans  << ...