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

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 Article


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


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

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

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


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

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

What is Runtime Error(SIGSEGV)?

what is Runtime Error(SIGSEGV) ?

View Article


where the editorial of DIVGAME(Game Of Divisors) cook 44

Codechef Why u not give editorial of DIVGAME( Game Of Divisors ).

View Article


ANUGCD - Editorial

PROBLEM LINK:PracticeContestAuthor:Anudeep NekkantiTester:Mahbubul HasanEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Segment Tree, FactorizePROBLEM:Given N numbers in a sequence, answer M...

View Article

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

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

C++ 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 Article


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

sigabrt in my code for little elephants and strings

http://www.codechef.com/viewsolution/3598927 plz help

View Article


GETTING WA in ABCstrings

http://www.codechef.com/viewsolution/3645055 this code gives me wrong answer.. kindly help :)

View Article

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


DIVGAME - Editorial

PROBLEM LINK:PracticeContestAuthor:Konstantin SokolTester:Gerald AgapovEditorialist:Tasnim Imran SunnyDIFFICULTY:Easy-MediumPREREQUISITES:Game Theory, Sieve of ErasthosenesPROBLEM:Two players are...

View Article

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

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


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