EDITORIAL- Crazy boy CRANIUM 2014
Level: MediumConcepts: Matrices, Permanent of matricesProblem link: http://www.codechef.com/CRNM2014/problems/CRANCBOYThe question asks you to determine the permanent of the matrix in disguise. It can...
View ArticleEDITORIAL- Crazy Girl CRANIUM 2014
Concepts: Z algorithm, String matchingLEVEL: medium-hardProblem Link:http://www.codechef.com/CRNM2014/problems/CRANGIRLWe can use the Z algorithm to solve this problem in O(|A|) time by running it on...
View ArticleCDCRFT14 SUBBXOR Editorial
PROBLEM LINK:ContestDIFFICULTY:MEDIUMPROBLEM:Given an array of positive integers and a number K, find the number of subarrays whose XOR is less than K. XOR of subarray is defined as XOR of all elements...
View ArticleWA in ATOM
i dont know why m getting wrong answer here..can any1 help....http://www.codechef.com/viewsolution/3316227
View ArticleTLE in c but AC in c++ in EQIDLIS
Here is my code which gives TLE in c but is accepted in c++. How can i make it run within time limit in c as it is my preferred language.include<stdio.h>int main() { int test,n,count;...
View ArticleTSORT : tle
Although the question can be done many other ways and get AC, but it gives TLE if we intend doing it using list iterators.. STL. Is there a way of getting AC using STL(list , vectors gives AC)?...
View ArticleCRANGIRL - Editorial
Concepts: Z algorithm, String matchingLEVEL: medium-hardProblem Link:http://www.codechef.com/CRNM2014/problems/CRANGIRLWe can use the Z algorithm to solve this problem in O(|A|) time by running it on...
View ArticleCRANCBOY - Editorial
Level: MediumConcepts: Matrices, Permanent of matricesProblem link: http://www.codechef.com/CRNM2014/problems/CRANCBOYThe question asks you to determine the permanent of the matrix in disguise. It can...
View ArticleCRANBROM - Editorial
Level: MediumConcepts: Greedy,Dynamic programming, hashingProblem link: http://www.codechef.com/CRNM2014/problems/CRANBROMThis one can be done in many ways. Here is an O(n) solution .Below I will...
View ArticleCRANCRD - Editorial
Level: CakewalkConcepts: Basic GeometryProblem Link: http://www.codechef.com/CRNM2014/problems/CRANCRDJohny measures the distance between P1(x1,y1) and P2(x2,y2) as : D(P1,P2) = |x1 - x2| + |y1 – y2|A...
View ArticleCRANATOM - Editorial
LEVEL: Easy CONCEPTS: Graph theory, proof by construction Problem link http://www.codechef.com/CRNM2014/problems/CRANATOMLet the atoms be the nodes and bonds be the edges, then the compound represents...
View ArticleSUBBXOR - Editorial
PROBLEM LINK:ContestDIFFICULTY:MEDIUMPROBLEM:Given an array of positive integers and a number K, find the number of subarrays whose XOR is less than K. XOR of subarray is defined as XOR of all elements...
View ArticleCIRCLES - Editorial
PROBLEM LINK:ContestDIFFICULTY:HARD PREREQUISITES:CircumcenterQuadratic Equations Basic Geometry PROBLEM:Given two circles in 3 dimensions (denoted using 3 points on each circle) find whether they are...
View ArticleCOPRIME - Editorial
PROBLEM LINK:ContestDIFFICULTY:HARDPREREQUISITES:Bipartite GraphMaximum Bipartite MatchingMinimum Vertex CoverKonig's TheoremEXPLANATION:Problem boils down to:Given a bipartite graph with directed...
View ArticleBALLS - Editorial
PROBLEM LINK:ContestDIFFICULTY:EASYPROBLEM:Given N(<=10^5) balls, each with a number on top and bottom, find minimum number of flips that can make at least half of the balls show same number on...
View ArticleATOM - Editorial
PROBLEM LINK:ContestDIFFICULTY:CAKEWALKPROBLEM:Given initial atoms in the lab (N), multiplication rate per second (K) and the maximum limit of atoms (M), print the time at which reaction should be...
View ArticleBIT - Editorial
PROBLEM LINK:ContestDIFFICULTY:CAKEWALKPROBLEM:Print sum of set bits of all numbers from 1 to N.QUICK EXPLANATION:Simple simulation. For each number we count set bits and add them to the final answer....
View ArticleMAXCOUNT - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONThis was supposed to be a problem that anyone who knows basic programming could solve and I'm glad that it's satisfied our expectations.For the...
View ArticleJust an idea on faster publication of editorials
Just saying...if the authors of the problems on long/short contests submit an explanation along with the problems there wouldn't be any delays. It'd be great if their explanation included the following...
View Article