Quantcast
Channel: CodeChef Discuss - latest questions
Browsing all 40121 articles
Browse latest View live
↧

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 Article


EDITORIAL- 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 Article


CDCRFT14 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 Article

Header files in Codechef for C

What are available header files in codechef compiler?

View Article

WA in ATOM

i dont know why m getting wrong answer here..can any1 help....http://www.codechef.com/viewsolution/3316227

View Article


TLE 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 Article

TSORT : 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 Article

CRANGIRL - 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 Article


CRANCBOY - 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 Article


CRANBROM - 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 Article

CRANCRD - 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 Article

CRANATOM - 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 Article

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 Article


CIRCLES - 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 Article

COPRIME - Editorial

PROBLEM LINK:ContestDIFFICULTY:HARDPREREQUISITES:Bipartite GraphMaximum Bipartite MatchingMinimum Vertex CoverKonig's TheoremEXPLANATION:Problem boils down to:Given a bipartite graph with directed...

View Article


BALLS - 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 Article

ATOM - 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 Article


BIT - 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 Article

MAXCOUNT - 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 Article

Just 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
Browsing all 40121 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>