Longest Common Pattern
How to make output screen wait without using getch() or delay()?
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 ArticleCollege wise Codechef ratings- please see this site
Guys please check out this awesome site. You can add your code chef username and it will display rankings of users from your college. Please add your college if it is not present and then add usernames...
View ArticleAlternative to using printf repeatedly
What is the best way to display output quickly? Is it recommended to write all output to one string and then print the string at once? Are there any libraries for quick input/output?
View Articlehello... friends... who want to learn java... free... free...
see... my sites... and get cool tutorials... dailyclick here
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 ArticleHow to learn programming in C++ and code here
Should I run through the tutorial on learncpp.com and then attempt these problems? Or is there more I need to know
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 Article