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

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 Article


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


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

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

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


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

about memset

can anyone tell me what is the function of memset???

View Article

Image may be NSFW.
Clik here to view.

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


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


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

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

Why CodeChef doesnt support coloring system?

Why doesn't Codechef support coloring system like TopCoder and Codeforces according to ratings...??

View Article

Ratings have been updated- Please check

Ratings updated!! No delay this time. good work.

View Article


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

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


simply sort it

smone plz.. tell an effeftive algo for TSORT BEST SOLUTIONS R DIFFICLT 2 UNDERSTAND.... :(

View Article

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


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

reversing single linked list

reversing single linked list without stack or anr other datatype please suggest some algorithm

View Article

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