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

TLG - Editorial

PROBLEM LINK:PracticeAuthor:ADMINEditorialist:SUSHANT AGARWALDIFFICULTY:EASYPREREQUISITES:Basic looping,ArraysPROBLEM:At the end of each round the leader and her current lead are calculated. Once all...

View Article


CHSTR - Editorial

PROBLEM LINK:PracticeContestAuthor:Vasia AntoniukTester:Mahbubul Hasan and Sunny AggarwalEditorialist:Balajiganapathi SenthilnathanRussian Translator:Sergey KulikMandarian Translator:Minako...

View Article


Image may be NSFW.
Clik here to view.

MUPDO - Editorial

PROBLEM LINK:PracticeContestAuthor:Animesh FatehpuriaEditorialist:Arjun PDIFFICULTY:Medium-HardPREREQUISITES:Math, Persistent Segment TreesPROBLEM:You have an $N \times N$ grid. Given $N$ and $K$,...

View Article

LVP - Editorial

PROBLEM LINK: PracticeContestAuthor:Animesh FatehpuriaEditorialist:Pradeep JoshiDIFFICULTY:Easy-MediumPREREQUISITES:DFSPROBLEM:Given a graph having one source and sink node, where each node has exactly...

View Article

BTREEKK - Editorial

PROBLEM LINK:PracticeContestAuthor:Kunal KhannaEditorialist:Arjun PDIFFICULTY:Easy-MediumPREREQUISITES:NonePROBLEM:You have a complete binary tree of $N$ nodes. Given an integer $X$, find two...

View Article


Monk in the Grass Fields - HackerEarth (Sorting)

Problem link: https://www.hackerearth.com/code-monk-sorting/algorithm/monk-in-the-grass-fields/My code: https://www.hackerearth.com/submission/2962880/My logic: 1) Find sum of elements in each row and...

View Article

How to solve this range update and point query question?

There are $2$ types of queries.$1.$ Update values from $l$ to $r$ to $v$.$2.$ Retrieve the value at index $k$.For queries of type $2$ , I need to output the values.$1 \le $ Queries $ \le 10^5$How to...

View Article

Image may be NSFW.
Clik here to view.

AMR14C -Editorial

PROBLEM LINK:PracticeContestDIFFICULTY:EASY.PREREQUISITES:HashingPROBLEM:Given an array, find out pair of numbers such their sum modulo M is less than or equal to X.QUICK EXPLANATION:As the naive...

View Article


Snackdown goodie dispatch

Hi,is there any information regarding Snackdown 2015 T-shirt dispatch? I haven't heard from organizers in a long time, so I was just wondering when could we expect the deliveries to happen?Regards,...

View Article


WEIGHT(SPOJ)-Why am i getting wrong answer?Pls help

Question-> http://www.spoj.com/problems/WEIGHT/My Algo: Traverse through the array and add a[i]*w to the sum,given w=2 if a[i]<0 & wprev=2, else w=wprev+1.My code:...

View Article

Subarray Sum - Editorial

Problem LinkPracticeContestAuthorRishab PatiTesterRajat DeEditorialistRajat DeDifficulty MediumPre-requisites - Maths , Modulo , Pigeonhole PrincipleProblem: Find all numbers which will definitely...

View Article

Image may be NSFW.
Clik here to view.

AMR14B - Editorial

PROBLEM LINK:PracticeContestDIFFICULTY:EASY-MEDIUMPREREQUISITES:Dijkstra's algorithm, Prim's algorithmPROBLEM:Given an undirected weighted graph, find whether there exist a shortest path tree(rooted at...

View Article

SUBINC - Editorial

Problem LinkPracticeContestDifficultySimplePre-requisitesSimple dynamic programmingProblemCount the number of non-decreasing subarrays of the given array A[].How to get 20 pointsLet's choose the left...

View Article


Ambiguous Permutations - Explain the statement

I have been trying to understand the meaning of the problem statement of Ambiguous Permutations for some time. But I still haven't been able to figure out what are the various types of permutations...

View Article

XORSUB - Editorial

PROBLEM LINK:PracticeContestAuthor:Lalit KunduTester 1:Minako KojimaTester 2:Shiplu HawladerEditorialist:Pawel KacprzakDIFFICULTY:SIMPLEPREREQUISITES:DP, bitsPROBLEM:You are given an array A of N...

View Article


What is wrong with this code for the ATM problem?

Everytime I compile it, I get correct answers. But when I submit it here, it says wrong answer. [http://www.codechef.com/viewsolution/1015864 ]import java.util.Scanner; class ATM { public static void...

View Article

GDOG - Editorial

PROBLEM LINK:PracticeContestAuthor:Pavel SheftelevichTester:Vlad MoskoEditorialist:Pawel KacprzakDIFFICULTY:CAKEWALKPREREQUISITES:Simple mathPROBLEM:You have $N$ coins. You are about to call any number...

View Article


NZEC error for FIRESC problem. Help needed!

This is the link to my code ==>> https://www.codechef.com/viewsolution/8869656I have used vector array to make adjacency list and run DFS on it without Stack implementation, with the help of a...

View Article

Data Structures and Algorithms

Hi all, I need your help to make a list of most used data structures and algorithms along with their tutorials, implementation and some problems on them. It will be helpful to everyone in many ways. I...

View Article

HORRIBLE-SPOJ with Lazy Propagation

Implemented Segment tree with lazy propagation but still getting TLE. Help?SPOJ-HORRIBLEMy Code:

View Article
Browsing all 39796 articles
Browse latest View live


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