substring matching
Given a string S and and integer K, find the integer C which equals the number of pairs of substrings(S1,S2) such that S1 and S2 have equal length and Mismatch(S1, S2) <= K where the mismatch...
View ArticleCheating cases for August Long Challenge 2013
The following 4 sets have same code, some of them have "intelligently" copied though: 1. http://www.codechef.com/viewsolution/2505301 and http://www.codechef.com/viewsolution/2510050 2....
View ArticleMaking sure user inputs all input before thrwing exception
I am developing code in which i need user must enter all the inputs and compiler should throw exception after taking all inputs and do not close program execution abruptly.Lets say I have to take 4 num...
View ArticleProblem SPOJ - Event Count TLE
http://www.spoj.com/problems/GEEKOUNT/any idea what to do to make it small.. precomputing values till 10^6 also nt wrkin for 10^9 elements
View ArticleRuntime error (SIG SEGV)
Solving following question: http://www.codechef.com/problems/TSORT/Getting above error for following code:#include <iostream> using namespace std; int arr[10000]; void sort(int arr[], int n) {...
View ArticleNZEC IN PALIN. Need Help.
My code works for the given test cases but I get an NZEC in the codechef compiler. I believe the problem is not that simple as it looks however I do not understand where my code went wrong. Here is my...
View ArticleA tutorial on the Extended Euclid's Algorithm
Hello @all,Following my previous tutorial on Repeated Squaring, I will now focus on the Extended Euclid's Algorithm, which as you will be able to see, can be seen as the reciprocal of modular...
View ArticleDELNMS - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYCHALLENGEPREREQUISITESAd HocPROBLEMYou are given a sequence of N integers. You wish to delete all the numbers in this sequence.The only operation available to you...
View ArticleDivide array into subsets such that difference of sum is minimum
Please help me in this problem. I am getting very high complexity ....Divide the array into two subsets S1 and S2 such that abs(sum(S1)-sum(S2)) is minimum and both the sets should have equal number of...
View ArticleSeparate final test cases for Challenge Question.
@admin , @everyone : I believe final test cases for Challenge Question should be different from those used during the contest . The practice of making hundred's and thousand's of submission's to...
View ArticleWhy CodeChef doesnt support coloring system?
Why doesn't Codechef support coloring system like TopCoder and Codeforces according to ratings...??
View ArticleRatings have been updated- Please check
Ratings updated!! No delay this time. good work.
View Articlesmall factorials
/* my code fore the program small factorial */ /*move to bottom*/ #include<stdio.h> double FACT(short int n) ; int main() { short int X,i=0; int NUM[100]; scanf("%d",&X); if(1<=X<=100){...
View ArticleSmall improvements for code chef
I was thinking of what improvements can be done to code chef without some big effort like a new feature but just some small tweaking . I came up with the following list : 1. Include global time...
View Articlesimply sort it
smone plz.. tell an effeftive algo for TSORT BEST SOLUTIONS R DIFFICLT 2 UNDERSTAND.... :(
View ArticleNZEC error in C# Sums in a Triangle problem
This is my solution: http://www.codechef.com/viewsolution/2531226I have read many articles. Everywhere I read this:Usually, returning non-zero values from main() will cause this error. It helps telling...
View Articleproblem with long contest rating
@admin yesterday my long rating till july contest was around 2900 and rank was arounbd 690 .. and after august long ratings.. my profile is showing my july rating around 1200.. how is this possible.....
View Articlereversing single linked list
reversing single linked list without stack or anr other datatype please suggest some algorithm
View Articleplz help....getting WA.....:(
I tried to figure out every test case covered .....but still getting wrong answer ....please point out my mistake .... this is the problem statement http://www.codechef.com/AUG13/problems/CHMODmy...
View Article