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

LWS - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONLongest Weird Subsequence: This problem can be solved using dynamic programming. The trick to this problem was to come up with a good dp state. We...

View Article


Image may be NSFW.
Clik here to view.

India Hacks | Hackerearth: Amazing prizes to be won

HackerEarth's flagship event IndiaHacks is back and this time it’s bigger than ever. From being one of the largest annual programming contest, IndiaHacks is now going to be a massive month long coding...

View Article


hashing, Array size greater than 10^6

How to hash numbers more than 10^6 or more??

View Article

ADIGIT WA cant find error

I tried to solve this problem(https://www.codechef.com/problems/ADIGIT) with same logic as given in Editorial still getting WA plz explain flaw in my code Description of code 1)Take an structure...

View Article

Image may be NSFW.
Clik here to view.

CHRL4 - Editorial

PROBLEM LINKSContestPracticeAuthor: Roman FurkoTester: Sergey KulikEditorialist: Praveen Reddy VakaDIFFICULTY:easy-mediumPREREQUISITES:basic dp, sliding window minimumEXPLANATIONThis can be modelled as...

View Article


AC still WA

@admin, In the question Chef and Cakes, when I submitted the solution, in the submission info, I got AC in (Sub-Task:1 and Task#:4), then why it is not counted as partially accepted, *means some...

View Article

runtime error sigsegv in pcycle problem

can anyone tell what is wrong in my code....https://www.codechef.com/viewsolution/8710955

View Article

Assign SPOJ Re:dynamic programming with bitmask

A few days ago I asked how to solve the ASSIGN problem of SPOJ through bit masking and got a satisfactory answer herehttp://discuss.codechef.com/questions/49559/dynamic-programming-bit-maskingI am...

View Article


How to determine if a problem is related to Greatest Common Divisor ?

I want to know if there is any basic property of some questions which leads to its solution using GCD algorithms.

View Article


getchar_unlocked()

how to convert input taken by getchar_unlocked() to signed integers..

View Article

ZCO 2014 Smartphone

Why is my code not getting accepted even when i have tested all selfmade testcases to be running correctlyMy code is at given link- link

View Article

ZCO 2014 Smartphone

Why is my code not getting accepted even when i have tested all selfmade testcases to be running correctlyMy code is at given link- link

View Article

Image may be NSFW.
Clik here to view.

Challenge CLI - A command line tool for competitive programming

Hi everyone! Challenge CLI is a simple command line utility which I created. It shows you all the active contests, upcoming contests, short contests and hiring contests directly on your terminal. It's...

View Article


What are karma points?

I am new to this karma system, Can you explain me why is it called so? What has karma points got to do with contribution?

View Article

Given an array of integers, divide the array into k subarrays such that the...

For example, let us consider dividing the following array into 5 subarrays:[0,1,2,1,3,1,5,6]The optimal way to divide this is [0,1,2],[1,3],[1],[5],[6] since the maximum sum subarray has sum 6 and...

View Article


Lead Game: Can someone give other test cases so I can find out what's wrong?

import java.io.*; import java.lang.Math; class Lead_Game { public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int t =...

View Article

POST - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYHARDEXPLANATIONAs suggested by the problem constraints, there are 2 cases to be dealt with.Case 1: W≥N and H≥N.In this case, a O(N^2) solution is possible. We note...

View Article


How can I use binary search tree to implement set operations?

I have read about binary search trees in Wikipedia and it says that it is used to implement sets, multisets and associative arrays. My question is can any binary search tree be used as sets supporting...

View Article

What are the compiler options that the judge uses?

Some languages are weirdly slow on some problems. Do they have optimization enabled/disabled while compiling? Does the online judge use any specific options while compiling my program? Is there a way...

View Article

ESSAY FOR SCHOOL

I've got to write an essay about famous algorithms (mostly sorting and searching) in various programming languages (in my case C++ and Pascal, and maybe but very unlikely Java). Can somebody please...

View Article
Browsing all 39796 articles
Browse latest View live


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