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 ArticleLFEB14B - Editorial
Problem Link:contest, practiceDifficulty: CakewalkPre-requisites: Implementation, MathsProblem:We are given array A[], that consists of N integers. We need to count the number of subsets of A[], whose...
View ArticleUsing scanf giving wrong answer
#include <iostream> #include <cstdio> using namespace std; int main() { int n; scanf("%d",&n); int64_t l; l=int64_t(n)*int64_t(n+1); l=(int64_t)(l)/2; int64_t total(0); for (int...
View ArticleAdding a feature to view output of submissions
You should add a feature to see the output and the expected output of a submission of course only in the practice session. It saves a lot of time to figure out where we are going wrong. Most of the...
View Articleuva contest site?
sorry, it is off-topic, but is it new uva online contest site :codemarshal.comcouldnt reach, though the site is not down: http://www.isitdownrightnow.com/codemarshal.com.html
View Articlemaximum flow
hi all, Can anyone please link me to a good tutorial for Maximum Flow Problem. I started studying it from Cormen , but it is not very clear.. then i tried it from Topcoder tutorial, it seems as if it...
View Articleparameter passing in function
include<stdio.h>int main() { int i=5; printf("%d %d %d %d %d",i++,i--,++i,--i,i); return 0; } It's giving a output 4 5 5 5 5,but it should be 4 5 5 4 5.Why is this happening?
View Articlewhere the editorial of DIVGAME(Game Of Divisors) cook 44
Codechef Why u not give editorial of DIVGAME( Game Of Divisors ).
View ArticleANUGCD - Editorial
PROBLEM LINK:PracticeContestAuthor:Anudeep NekkantiTester:Mahbubul HasanEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Segment Tree, FactorizePROBLEM:Given N numbers in a sequence, answer M...
View ArticleFREQUENT SPOJ....:(
hey was tried solving http://www.spoj.com/problems/FREQUENT/ but "WA" comes up..plz find the bug.or provide any test cases where my code fails.. my solution http://ideone.com/9dNJtd
View ArticleHow to solve this question?
Raju and Rani and playing games in the school. Raju has recently learned how to draw angles. He knows how to draw some angles. He also can add/subtract any of the two angles he draws. Rani now wants to...
View ArticleC++ FCTRL2 Wrong Answer ?
#include <iostream> using namespace std; int main() { int t; int n; int x; cin >> t; while(t) { cin >> n; x = 1; for(int i = 2; i <= n; i++) { x *= i; } cout << x <<...
View ArticleNUMGAME2 - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONFor this particular combinatorial game theory problem the the values of N for which the first player looses are 1,5,9,13,17,21,25 etc.SETTER'S...
View Articlesigabrt in my code for little elephants and strings
http://www.codechef.com/viewsolution/3598927 plz help
View ArticleGETTING WA in ABCstrings
http://www.codechef.com/viewsolution/3645055 this code gives me wrong answer.. kindly help :)
View ArticleWhat are Dynamic Programming problems in practice session?
I'm looking for some DP problems to practice; however at my current level, I don't often realize a problem that requires DP technique right away. So I usually use brute-force, or very lengthy solution....
View ArticleDIVGAME - Editorial
PROBLEM LINK:PracticeContestAuthor:Konstantin SokolTester:Gerald AgapovEditorialist:Tasnim Imran SunnyDIFFICULTY:Easy-MediumPREREQUISITES:Game Theory, Sieve of ErasthosenesPROBLEM:Two players are...
View ArticleGetting WA in MARBLEGF
I have been trying this problem which is supposed to be solved using fenwick trees The data structure i used is a tree where all the leaves are the array and for every node the value is sum of values...
View ArticleMAXCOUNT - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONThis was supposed to be a problem that anyone who knows basic programming could solve and I'm glad that it's satisfied our expectations.For the...
View Article