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

hard : The Guessing game ::: Can someone help me getting out of this ? My...

My code is giving current answer but i dont know why it is not accepting it and giving runtime(NZEC) error, followimg is the link to my code: http://www.codechef.com/viewsolution/3134167

View Article


Solving Range Minimum Queries using Binary Indexed Trees (Fenwick Trees)

Formally, the Range Minimum Query Problem is:Given an array A[0, N-1] , Find the position of the element with the minimum value between any two given indices.Now, the standard solution is to use a...

View Article


Image may be NSFW.
Clik here to view.

J7 - The Best Box guidance

http://www.codechef.com/problems/J7 codechef J7 - "the best box" guidance: - to get optimal maximum size: (special thanks to falcon - Sahin Mammadov) suppose we have 2 functions "a" & "b". function...

View Article

PPTEST - Editorial

PROBLEM LINKS:PracticeContestAuthor:Vitaliy HerasymivTester:Tasnim Imran SunnyEditorialist:Tuan AnhDIFFICULTY:EasyPREREQUISITES:Dynamic ProgrammingPROBLEM: There are N questions. The ith question needs...

View Article

Cube cakes question(dec 2013 challenge)

1.Can anybody explain me this question http://www.codechef.com/problems/CUBE2.Also suppose input: 1 3 100 abcdefghijklmnopqrstuvwxyza abcdefghijklmnopqrstuvwxyzx o/p: 2 7 How?

View Article


CANDLE - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONThe answer will always be either a repdigit (a number composed of repeated instances of the same digit) or a power of 10. We find the smallest power...

View Article

what is happening in while loop of linked list traversing program??

struct node { int info; node *link; }; int main() { node a[100]; node *start=&a[1]; int n,i,item; cout<<"Enter No. of Nodes in Linked List : "; cin>>n; cout<<"\nEnter Info of...

View Article

WA in KINGCON

I was trying to solve this simple problem but unfortunately my answer isnt coming right http://www.codechef.com/problems/KINGCON. Here is my code http://ideone.com/1G9qVs . I am trying to implment the...

View Article


WA in knapsack problem.

problem link: http://www.spoj.com/problems/PARTY/my solution: http://ideone.com/1DbuAFProblem is,I'm getting a different(least possible) value for the sum of entrance part for the same optimal...

View Article


HELP IN COMBINATORICS

Hey guys, i need help in combinatorics, can anyone suggest me any good book for combinatorics or some tutorial online ?? and some basic problems to solve in combinatorics !! I'd be glad if anybody can...

View Article

Code Review

I am trying to solve this problem on CodeForces. I came up with a solution and submitted it. However it is showing wrong answer on both testcases though it works completely fine on my system. Is...

View Article

Rectangular queries logic unveiled

I am a newbie on codechef and this problem(http://www.codechef.com/problems/RECTQUER)from Dec Challenge 2013 consumed my 4 days(solved it yesterday).So i thought it was worth to unveil the logic of...

View Article

cin works but getchar() doesn't while taking a char input

these are my two solutions for marblegf during december long challange.http://www.codechef.com/viewsolution/3085218http://www.codechef.com/viewsolution/3078607look at both the solutions. the only...

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

GERALD04 - Editorial

PROBLEM LINK:PracticeContestAuthor:Gerald AgapovTester:Tasnim Imran SunnyEditorialist:Jingbo ShangDIFFICULTY:CakewalkPREREQUISITES:ProgrammingPROBLEM:GF --- (t2 - t1) --- Chef --- dist --- HomeGiven...

View Article


REMOVING UNNECESSARY POSTS

@all : May i know if it is possible to remove questions from our forum(if so how), because certain questions such as this deserves to be removed ( may be he wants to advertise his blog so down voting...

View Article

python powers of 2

def power(m,n,x): temp=power(m,n/2,x) if n%2 == 0: return (temp%x*temp%x)%x else: return (m*temp%x*temp%x)%x t=int(input()) g=1298074214633706835075030044377087 while(t): t=t-1 p=int(input()) print...

View Article


Vertical Sum of a Binary Tree. (Column-Wise Sum)

Hello everybody, I was solving a Data-Structure Problem , Finding the Vertical Sum in a binary tree. Vertical Sum means sum of nodes in same column. Let me explore the question with an example....

View Article

Amritapuri Regionals Problem A - Quiver - LRU - Slow insertions in map and list

The problem is the first one in this pdf - http://icpc.amrita.ac.in/2013/wp-content/uploads/2013/12/ProblemsSets2013Asia-Amritapuri.pdf .My code http://ideone.com/wfuME8 is a implementation of LRU...

View Article

Image may be NSFW.
Clik here to view.

RECTQUER - Editorial

PROBLEM LINK:PracticeContestAuthor:Roman RubanenkoTester:Gerald AgapovEditorialist:Jingbo ShangDIFFICULTY:EasyPREREQUISITES:Prefix sumPROBLEM:Given a N*N matrix of at most 10 different numbers, answer...

View Article
Browsing all 40121 articles
Browse latest View live


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