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
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]
Team ATC
Jul 31, 20212 min read
61 views
0 comments
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...
Team ATC
Jul 4, 202110 min read
284 views
0 comments
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 ...
Team ATC
Jul 3, 20217 min read
282 views
0 comments
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 ...
Team ATC
Jul 3, 20214 min read
519 views
0 comments
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...
Team ATC
Jul 2, 20212 min read
698 views
0 comments
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 ...
Team ATC
Jul 2, 20212 min read
126 views
0 comments
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, ...
Team ATC
Jun 25, 20212 min read
108 views
0 comments
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
Team ATC
Jun 20, 20213 min read
155 views
0 comments
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)...
Team ATC
Jun 20, 20211 min read
200 views
0 comments
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...
Team ATC
Jun 20, 20212 min read
124 views
0 comments
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
Team ATC
Jun 8, 20212 min read
917 views
0 comments
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
Team ATC
Jun 6, 20212 min read
1,186 views
1 comment
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...
Team ATC
May 12, 20212 min read
122 views
0 comments
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...
Team ATC
May 9, 20213 min read
2,511 views
5 comments
Solubility - CodeChef Solution in Java and C++| AskTheCode
CodeChef May Long Challenge Solution | Solubility (SOLBLTY) solution | AskTheCode Solubility (SOLBLTY) solution Problem: Suppose for a...
Team ATC
May 7, 20211 min read
1,187 views
0 comments
OR of ANDs CodeChef Solution | AskTheCode
April Cook-Off 2021 Solution | OR of ANDs (OROFAND) Solution in C++...You are given an array A with N integers. An array's score...more
Team ATC
Apr 19, 20212 min read
115 views
0 comments
Boolean Game - CodeChef Solution in Java| AskTheCode
CodeChef April Long Challenge Solution - Boolean Game solution...AskTheCode. BOOLGAME Solution in C++.Problem: Consider N binary variable...
Team ATC
Apr 11, 20215 min read
179 views
0 comments
Hacker Rank solution for Preprocessor Solution In C++
Asked: Anonymously | Category: C++ #define toStr(x) #x #define io(v) cin >> v #define INF 100000000 #define foreach(v, i) for(int i = 0;...
Team ATC
Sep 17, 20201 min read
6 views
0 comments
bottom of page