top of page
Coding Solutions is a great section for every coder. You can get answers to your programming questions here by the Team ATC. You can even ask for the answer to competitive programming language questions as well. First, search your question here, and if not found. Then, ask your question to Ask The Code members, and you will get your answer in no time from the members of this Indian Developer Community. Happy Coding.
Search
Team ATC
Jul 31, 20212 min read
Tree - Find the smallest non-negative integer | AskTheCode
Tree...You are given a tree having A nodes numbered from 0 to A-1, rooted at node 0. Each node has a distinct value ranging between [0, A-1]
61 views0 comments
Team ATC
Jul 5, 20213 min read
Dakimakura Distribition Codechef July Long Challenge Solution | AskTheCode
Only a few centuries later, the Berland government realized what was necessary for the country's prosperity. That's right, a dakimakura ...
276 views0 comments
Team ATC
Jul 4, 202110 min read
Madoka and Ladder Decomposition - Codechef July Long Challenge Solution
Madoka was given a tree on her coming of age, and not a simple one, but a rooted tree of n vertices with a root at the vertex with number...
284 views0 comments
Team ATC
Jul 3, 20217 min read
Even Odd Partition Codechef July Long Challenge Solution | AskTheCode
Let f(n) be the number of ways to partition the array [1,2,3,…,n] into contiguous sub-arrays such that every pair of adjacent sub-arrays ...
282 views0 comments
Team ATC
Jul 3, 20214 min read
Chef and Pairs Codechef - July Long Challenge Solution in C++
You are given a tree (connected, undirected, acyclic graph) consisting of N nodes. Based on this tree, you have to answer Q queries ...
519 views0 comments
Team ATC
Jul 2, 20212 min read
Chef vs Bharat - CodeChef July Long Challenge solution in Python | AskTheCode
Chef and his friend Bharat have decided to play the game "The Chefora Spell". In the game, a positive integer N (in decimal system) is ...
2,010 views1 comment
Team ATC
Jul 2, 20213 min read
K Path Query - Codechef Solution | AskTheCode
You're given a tree with N vertices numbered from 1 to N. Your goal is to handle Q queries. For each query you are given K nodes v1,v2,…,vK.
1,157 views0 comments
Team ATC
Jul 2, 20212 min read
XxOoRr - Codechef July Long Challenge Solution in C++ | AskTheCode
Given an array A1,A2…AN, find the minimum number of operations (possibly zero) required to convert all integers in A to 0...
698 views0 comments
Team ATC
Jul 2, 20212 min read
Maximum Production - Codechef Solution in C++ | AskTheCode
Chefland has 7 days in a week. Chef is very conscious about his work done during the week. There are two ways he can spend his energy ...
126 views0 comments
Team ATC
Jun 25, 20212 min read
A smallest number - June Circuits '21 HackerEarth solution | AskTheCode
You are given an integer K. Find the smallest number N such that N has exactly K digits and none of the digits in N is $$0$$. Also, ...
108 views0 comments
Team ATC
Jun 20, 20213 min read
Too Much Xor Codechef Solution in C++| AskTheCode
Chef calls a sequence of integers A1,A2,…,ANgood if it satisfies the following conditions: In particular, any sequence with length 1... more
155 views0 comments
Team ATC
Jun 20, 20211 min read
The Wave Codechef Solution in C++ | AskTheCode
Chef is stuck in the wavey world of polynomials. You are given all N roots of a polynomial P(x)=∏Ni=1(x−ai)...
198 views0 comments
Team ATC
Jun 20, 20212 min read
Chefland Visa Codechef Solution - AskTheCode
Ash is trying to get visa to Chefland. For the visa to be approved, he needs to satisfy the following three criteria: Solve at least x1...
124 views0 comments
Team ATC
Jun 8, 20213 min read
Shortest Route Codechef Solution | AskTheCode
There are N cities in Chefland numbered from 1 to N and every city has a railway station. Some cities have a train and each city... more
824 views2 comments
Team ATC
Jun 8, 20212 min read
Bitwise Tuples - Codechef Solution -| AskTheCode
Chef has two numbers N and M. Help Chef to find number of integer N-tuples (A1,A2,…,AN) such that 0≤A1,A2,…,AN≤2M−1 and A1&A2&…&AN=0... more
917 views0 comments
Team ATC
Jun 6, 20212 min read
Bella ciao - Codechef Solution | AskTheCode
Chef is planning a heist in the reserve bank of Chefland. They are planning to hijack the bank for D days and print the money...more
1,186 views1 comment
Team ATC
Jun 6, 20212 min read
Summer Heat Codechef Solution in C++ and Java - AskTheCode
Chefland has 2 different types of coconut, type A and type B. Type A contains only xa milliliters of coconut water and type B contains...
292 views0 comments
Team ATC
May 12, 20212 min read
Simple calculator program in c++ using functions & do-while loop - AskTheCode
Simple calculator program in c++ using functions...Write a simple calculator program in C++ for basic computations...
122 views0 comments
Team ATC
May 12, 20211 min read
An Interesting Sequence CodeChef Soution - AskTheCode
Zanka finds fun in everyday simple things. One fine day he got interested in a very trivial sequence... more
2,395 views0 comments
Team ATC
May 9, 20213 min read
Tree House CodeChef May Long Challenge Solution | AskTheCode
CodeChef May Long Challenge Solution | Tree House (THOUSES) solution | AskTheCode Problem: There is a large tree house in an unknown...
2,511 views5 comments
bottom of page