No. of subtrees of a tree with atmost k egdes.
There is a tree with n vertices and n-1 edges.The problem is to find the number of subtrees of that tree that have at most k edges(k < n).Is there a DP solution also ???
View Articleunexpected behaviour - sizeof(array).. pls explain..
int array[5]; cout << sizeof(array) // prints 5*sizeof(int) onto the consolebut...int *array = new int[5]; cout << sizeof(array) // prints the same constant number always irrespective of...
View Articlefind string pattern in given sequence ...
There are many conventional algorithms to solve this problem... like KMP. Is there any algo which is better than kmp?Do codechef have any problem regarding string pattern matching for big sequences...
View ArticleHow to delete my CodeChef user name / account
I would like to delete my CodeChef user name/ account, please let me about the same ?
View ArticleNumber of connected components while removing an articulation point
I want to calculate number of connected components an articulation/cut vertex generates while removing it. I am calculating it as number of children +1 in dfs tree of the graph( for root, number of...
View ArticleWrong way to increase KARMA
@admin and @every1...this is not a QUES but just wanted to make you aware of the fact that few people are creating fake accounts and liking their own posts to generate KARMA...this is what i have...
View ArticleWhat is the star after some people in the discuss section
I find a few people with a star like symbol after their name?? What is that?? How can we get that?
View ArticleCan anyone help in Vectors?
I have heard that using vectors in programming contests would be very helpful. I searched in Internet but i did not get the proper basics.Can anyone please give me a c++ programme to find the mean of...
View ArticleHow to increase our Karma
as the faq says if we wants to unlike and the rest we need some points known as karama. how can we increase our karama in our account???
View Articlecannot vote down
i cannot vote down for answer...why is this like that??? when will be able to do so??
View ArticleHeight of Binary Search Tree (Iterative) in C
I want to know the algorithm to find the height of any BST in C.
View ArticleSPOJ AMR10G getting WA. Any specific test cases?
#include<stdio.h> int main() { int n,k,T,i,x,x1,p,y; long long int arr1[2000],arr2[2000],min,t; scanf("%d",&T); for(x=0;x<T;x++) { i=0; scanf("%d%d",&n,&k); for(x1=0;x1<n;x1++)...
View ArticleTOP BATSMEN [WA] check my code
http://www.codechef.com/viewsolution/2180244 what's wrong in this code..
View ArticleJacobsthal numbers
Jacobsthal numbers are analogous to fibonacci numbers their series is 0 1 1 3 5 11 21 43 85..... Now I came across an interesting problem where i found use of this not so well-known series if u want to...
View ArticleJUNONGF - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYMEDIUMPREREQUISITESMath, Repeated Squaring, Fermat's Little TheoremPROBLEMYou are given a N dimensional hyper rectangle. You have to fill each cell in the hyper...
View ArticleHave a problem in this.
I have a problem in this problem of SPOJ. I am not able to understand this problem. Can anyone help me to solve this problem.THANKS IN ADVANCE!
View Articlesize of int, long, long long on codechef
Please forgive me if this question is too silly, but I have to confirm this once for all..I just want to know the sizes of int, long, long long in bytes, on the codechef platform, according to the...
View ArticleSuggest new features you think should be added to CodeChef ?
I know have improved a lot by this codechef...its really awesome. But i would like to tell to the admin that codechef should improve a bit more, imean should add some more features....Such as message...
View ArticleIs there any option to know who is upvoting or downvoting our questions and...
Is there any option to know who is upvoting or downvoting our questions and answers? I have seen some nice questions downvoted ??Example : 1.Example 12.Example 23.Example 3
View Article