AMSGAME2 - Editorial
Problem Link:PracticeContestDifficulty:SIMPLEPre-requisites:Dynamic ProgrammingProblem:Given a sequences of N positive numbers A[0], A[1], ..., A[N-1], find how many subsequences of the integers are...
View Articleranking in codechef
I don't think i should mention the name, but i saw a guy who got 680 long and 321 short global rank by just giving 37 solved problems. Whereas i've also seen coders that have solved about 100 problems...
View ArticleDoubt in Counting terms (Feb11)
I am having problem calculating g(n, k) from f(n, k).Can anybody please give some kind of explanation for the problem.The editorial for the problem skips over this part.
View ArticleI2C to Ethernet on netburner
Need to know how should i go ahead with the coding for I2C to Ethernet and vice versa on a Netburner board, which supports C/C++...any suggestions?? thanks :-)
View ArticleThe Credits
Alan has recently joined an Engineering college. On the first day he came to know that each semester will contain N number of subjects and Di (where 1<=i<=N) is the credit associated with that...
View ArticleValid Phone Numbers (not on codechef)
How many valid numbers are possible? Write a C++ program that can compute the number of unique and valid phone numbers with the following set of constraints? (a) A valid phone number is seven digits in...
View Articleinterview questions
Hi @all,Can anyone post the coding questions asked by Microsoft,Amazon,Facebook etc...this year in the various IITs, NITs, BITS or IIITs, NSIT or any other colleges !!! Also, can you give links of...
View ArticleFinding all palindromes in String
It's my code to find all palindromes in string (2 characters or more),But I know it ain't a good piece.How can I optimize this code or is there any efficient algorithm for this type of...
View ArticleGetting Runtime Exception (SIGSEV)
I dont know what's wrong with this code. Please help#include<iostream> #include<cstring> using namespace std; string str; void increment(long j) { if(j<0) { str = '1' + str; return ; }...
View Articlepointer structure to a pointer structure
How to access elements of a dynamically allocated structure(node type in link list) via a pointer structure (of previous type). This pointer structure is a element of a pointer structure and made to...
View ArticleHs08TEST: Getting Wrong Answer
BElow is the code i generated and it matches the test cases output with ease on my system.However When i submit it here, I keep getting wrong answer. Any helpful insights ?#include <iostream>...
View ArticleWrong ans TPRODUCT
someone please tell my mistake in the following code below : http://www.codechef.com/viewsolution/2561758It is passing most of the test cases.
View ArticleCODEFORCES - Problem 318A Even Odds
Problem link : Even Odds My code : http://ideone.com/xnuKNK Why is it not giving any output even for small test cases?Second attempt (different code) : http://ideone.com/QuShGj It gives incorrect output.
View ArticleMartian Mining Problem of SPOJ
I am trying to solve the SPOJ Problem Martian Mining link textbut not able to think how to use Dynamic Programming here.Please help me how to appply DP in this problem.
View ArticlePlugin for parsing Codechef problems ?
Is there any plugins available for parsing contest problems and submitting them via some text editor ? I use Sublime Text 2 as text editor and C++ language.
View ArticleDfs Implementation using stack
I am implementing stack for dfs traversal, I am trying to give time stamps for each node, timestamp is given only when a node is new(start_time) or when we are done with that node i.e., no other new...
View ArticleWhen and how should I start learning Data Structures and Algorithms?
I had begun programming in C a 2 months ago. Before this, I did not have any programming experience. Till now I have only covered basic input, output functions, loops, if-else conditions, arrays and...
View ArticleSQLite Regarding queries
I have created a table in SQLite database with following statement.i.e. static final String DATABASE_CREATE = "create table " + "TEST" + "( " + "ID" + " integer primary key autoincrement," + " UID...
View ArticleByteCode: Diffusing a Bomb. Whats wrong with my JAVA code?
HiI have written the following code in JAVA. its working fine in NetBeans but I am getting "WRONG ANSWER" in the CodeChef compiler. Following lines are my code:// code deleted
View ArticleDatabase Connectivity
I am doing android application. I want to connect Microsoft SQL Server 2008 to that application. Is it possible to connect android apps with SQL Server in place of SQLite? If possible Kindly explain...
View Article