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

Binary tree structure in this case.

Imagine a binary tree lying on the floor with nodes as balls and edges as threads, you are given a pointer to a node. When you pick the tree from that node up what will be the structure of the tree....

View Article


finding subsets in an array

Pls suggest an algorithm to find the maximum no. of subset of length k in an array of length m where k<=m , having sum equal to a constant factor...e.g an array of length 112 5 1 2 4 1 6 5 2 2 1k=6,...

View Article


Present and future of the Competitive Programming proposal on Stack Exchange

As you may already know, the Competitive Programming proposal as a Stack Exchange Q&A site is closed in 64% of its commitment phase by a moderator with a short notice. I've created a question...

View Article

small factorials , FCTRL2 . why my code is not working??

#include<stdio.h> long int f(int); int main() { int t,n; scanf("%d",&t); if(t>=0 && t<=100) while(t) {scanf("%d",&n); if(n>=0 && n<=100) printf("%ld\n",f(n));...

View Article

Computing Factorials of a huge number in C/C++: A tutorial

Hello @all,As in MARCH13 contest we needed to use primary school arithmetics once again, and as it is a topic that comes up quite frequentely here in the forums thanks to this problem, and also, as I...

View Article


FLUSHOT - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONThe problem can be solved with a binary search approach. Given a value D, we can efficiently determine if there is a way to move each person with...

View Article

can any one give code for this problem

For the input word and a number, print all possible combinations that have as many characters as specified by the number. For example, CAT 2 would produce CA, CT, AT and DOG 1 would produce D, O ,G...

View Article

STREETTA and SSTORY rejudged?

Can someone please tell me why the judge makes these changes without any notice or some explanation. If you decide to reevaluate some problem please explain why (wrong test-cases - modification of...

View Article


LOWSUM - Editorial

PROBLEM LINK:PracticeContestAuthor:Vineet PaliwalTester:Roman RubanenkoEditorialist:Jingbo ShangDIFFICULTY:EASYPREREQUISITES:Sort, Priority Queue, Binary SearchPROBLEM:Given two arrays A[1..K],...

View Article


modulo calculate

how to calculate (!a/!b)mod N

View Article

Q & A on SE

"As you may already know, the Competitive Programming proposal as a Stack Exchange Q&A site is closed in 64% of its commitment phase by a moderator with a short notice. I've created a question...

View Article

Best known algos for calculating nCr % M

I have often encountered calculating nCr problems the last one being one of the IIIT-M problems but it probably had weak test cases that got easy solutions AC. The other one...

View Article

PROSUM getting wrong answer

For March challenge questin 2 :Little Chef and numbers I compiled the code in codeblocks and tested it for many conditions and it showed right answer. But in codechef its showing wrong answer . Kindly...

View Article


Confusion in input/output format of march 14 problem story?

I submitted my solution to a similar problem in spoj. In that problem we only have to count the length and got AC. I've been trying this one for quite sometime. I'm not asking for anything regarding...

View Article

practising problems under various paradigms

Is there any online judge where there is a clear classification of the problems according to various paradigms to be used to solve the problem for practising those paradigms? Or anything close to the...

View Article


Need program to print all prime numbers?

how to write a programme in C language print all the prime numbers 2-1000??????

View Article

BINTOUR March 2014

please someone explain the question bintour in march challenge 2014 or it's test cases

View Article


Large 2d matrix

I want to create a 2d matrix of size 3000000 X 3000000.When I am declaring the array in java I am getting NZEC error and SIGSEV in C++. How to declare a array of large size in Java and C++.

View Article

Feature for testing others solution

In current contest, SSTORY and STREETTA were rejudged and it came to be handy as almost half the solution found to be incorrect. Fortunately the admins were able to find that the test cases were weak....

View Article

Getting WA

please tell me why i am getting WA while it is giving the correct output for every test case i have checked....help me i am new here.. here is the question : http://www.codechef.com/problems/COINS here...

View Article
Browsing all 40121 articles
Browse latest View live


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