Skip to content
  • Home
  • Contact Us
  • About Us
  • Privacy Policy
  • DMCA
  • Linkedin
  • Pinterest
  • Facebook
thecscience

TheCScience

TheCScience is a blog that publishes daily tutorials and guides on engineering subjects and everything that related to computer science and technology

  • Home
  • Human values
  • Microprocessor
  • Digital communication
  • Networking
  • Toggle search form

Category: codechef solutions

Codechef XOR Equal problem solution

In this Xor equal CodeChef problem solution, You are given an array AA consisting of NN integers and an integer XX. Your goal is to have as many equal integers as possible in the array. To achieve this goal, you can do the following operation: Choose an index i (1≤i≤N) and set Ai = Ai…

Read More “Codechef XOR Equal problem solution” »

codechef solutions

HackerEarth Bob and Beauty of the Array problem solution

In this HackerEarth Bob and Beauty of the Array problem solution, Bob is having an array of A of N elements. Bob wants to determine the beauty of the array and the beauty of the array is defined as:-  Determine Bitwise OR of maximum and minimum elements of every subset of size greater than or…

Read More “HackerEarth Bob and Beauty of the Array problem solution” »

codechef solutions

Codechef How many unattempted problems solution

In this Codechef How many unattempted problems solution CodeChef recently revamped its practice page to make it easier for users to identify the next problems they should solve by introducing some new features: Recent Contest Problems – contains only problems from the last 2 contests Separate Un-Attempted, Attempted, and All tabs Problem Difficulty Rating –…

Read More “Codechef How many unattempted problems solution” »

codechef solutions

Codechef Add Two Numbers problem solution

In this Codechef Add, Two Numbers problem solution Shivam is the youngest programmer in the world, he is just 12 years old. Shivam is learning programming and today he is writing his first program. The task is very simple: given two integers A and B, write a program to add these two numbers and output…

Read More “Codechef Add Two Numbers problem solution” »

codechef solutions

Codechef Divisible by 3 problem solution

In this Codechef Divisible by 3 problem-solution Stack likes the number 3 a lot. He has two non-negative integers AA and BB. In one operation, Stack can do either of the following: A:=|A-B|A:=∣A−B∣ (change AA to |A-B|∣A−B∣) B:=|A-B|B:=∣A−B∣ (change BB to |A-B|∣A−B∣) Note that |X|∣X∣ denotes absolute value of XX. For example |-7| = 7∣−7∣=7…

Read More “Codechef Divisible by 3 problem solution” »

codechef solutions

Codechef Minimum number of Flips problem solution

In this Codechef Minimum number of Flips problem solution, Chef has an array AA of length N consisting of 1 and −1 only. In one operation, Chef can choose any index i (1 <= i <= N) and multiply the element Ai by -1. Find the minimum number of operations required to make the sum…

Read More “Codechef Minimum number of Flips problem solution” »

codechef solutions

Codechef Equal Distribution problem solution

In this Codechef Equal Distribution problem solution, Alice and Bob are very good friends and they always distribute all the eatables equally among themselves. Alice has AA chocolates and Bob has BB chocolates. Determine whether Alice and Bob can distribute all the chocolates equally among themselves. Note that: It is not allowed to break chocolate…

Read More “Codechef Equal Distribution problem solution” »

codechef solutions

Codechef Age Limit problem solution

In this Codechef Age Limit problem solution Chef wants to appear in a competitive exam. To take the exam, there are following requirements: Minimum age limit is XX (i.e. Age should be greater than or equal to XX). Age should be strictly less than YY. Chef’s current Age is AA. Find whether he is currently…

Read More “Codechef Age Limit problem solution” »

codechef solutions

Codechef First and Last problem solution

In this Codechef First and Last problem solution You are given an array A = [A_1, A_2, ldots, A_N]A=[A1,A2,…,AN] of length N. You can right-rotate it any number of times (possibly, zero). What is the maximum value of A1 + AN you can get? Problem solution in Python. # cook your dish hereimport mathT =…

Read More “Codechef First and Last problem solution” »

codechef solutions

Codechef Equal Integers problem solution

In this Codechef Equal Integers problem solution Chef has two integers XX and YY. Chef wants to perform some operations to make XX and YY equal. In one operation, Chef can either: set X := X + 1X:=X+1 or set Y := Y + 2Y:=Y+2 Find the minimum number of operations required to make XX…

Read More “Codechef Equal Integers problem solution” »

codechef solutions

Codechef Determine the Winner problem solution

In this Codechef Determine the Winner problem solution There is a contest containing 22 problems AA and BB. 22 strong participants PP and QQ participated in the contest and solved both the problems. PP made AC submissions on problems AA and BB at time instants P_AP  A and P_BP B respectively while QQ made AC…

Read More “Codechef Determine the Winner problem solution” »

codechef solutions

Codechef Playlist problem solution

In this Codechef Playlist problem solution Chef’s playlist contains 33 songs named A, BA,B, and CC, each of duration exactly XX minutes. Chef generally plays these 33 songs in loop, i.e, A rightarrow B rightarrow C rightarrow A rightarrow B rightarrow C rightarrow A rightarrow dotsA→B→C→A→B→C→A→… Chef went on a train journey of NN minutes…

Read More “Codechef Playlist problem solution” »

codechef solutions

Posts navigation

1 2 3 Next

Copyright © 2023 TheCScience.

Powered by PressBook Grid Blogs theme