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

In codechef do we have to print all output at same time, or each output after...

I am bit confused. Please tell me if I have N test cases, and if I print output after completion of a test case will this be considered as correct output? or I have to print all outputs together after...

View Article


c++ string and operator[]

The difference between operations:string s; s[0]= 'a'; cout<<s; gives nothing as output.string s; s+= 'a'; cout<<s; output: 'a'.string s= " "; s[0]= 'a'; will also print 'a'Can anyone...

View Article


Where can I learn the competitive programming techniques and algorithms in a...

I know that there are really good tutorials available at topcoder, but if a beginner wants to go from basics to advance to level. What are the things needed to do for that systematically? I'm a...

View Article

LCPESY-Editorial

PROBLEM LINK:PracticeContestAuthor:ShipluTester:Hiroto Sekido, Gerald AgapovEditorialist:Ajay K. VermaDIFFICULTY:CAKEWALK PREREQUISITES:Ad-hocPROBLEM:Given two alphanumeric strings, find the number...

View Article

Forgot Password runtime error help!

I am writing code in Java. It is showing Runtime Error NZEC I have tested for all possible inputs, and i am getting output as expected. I don't know where I am going wrong. Someone please give me few...

View Article


What is the best algorithm to find the most occurrence of a word in text?

Does anyone know what is the best algorithm to find the most occurrence of a word in text (very large), so hash map is not a solution I'm looking for. I'm thinking of either "Trie" or "Suffix Array"...

View Article

question are too hard to understand....

hello , I am new to the site, like any other newbie I decided to test the waters in the easy section. what I felt after reading a few question was "wtf" . Is there any way to simlipy the question, so...

View Article

Different return values

I have a function returning 8 for double return type and 7 for long return type. Am not posting the function since its someway related to the ongoing contest. Can anyone pls tell me why it happens so?...

View Article


Output of LEBLOCKS

Can Someone explain the output of the question "little elephant and blocks"....??

View Article


The complete list of string based algorithms?

may you please provide the complete list of string based algorithms needed to solve most of string based problems?

View Article

getting wrong answer for kingdom unity

pls temme y i am getting wrong answer for http://www.codechef.com/problems/KINGCON my solution is http://www.codechef.com/viewsolution/4061289

View Article

how to sort the co-ordinates (x, y) with respect to x? (c++ stl)

Suppose the list of pairs <(1, 3),(3, 2), (2, 4)> and i want to result as <(1, 3), (2, 4), (3, 2)>. How can i implement it using some STL in C++?Also sorting with respect to second element...

View Article

Strange WA

Hello, I've got very strange WA submitting this problem. After hours spent on searching of error, I replaced gets(a) with scanf("%s", a) and got AC. a - char[100000]. I think that this error is very...

View Article


Forgot Password

My program runs in time complexity O(n) but then also TLE. Please answer what to do and please don't reply that this is an ongoing competition because I am just clarifying. Thanks

View Article

Forgot Password

Can we get some more test case.

View Article


Maxim and Progressions

Sry, I didn't understand this: Sequence s[1],  s[2],  ...,  s[k] is called a subsequence of sequence a[1],  a[2],  ...,  a[n], if there will be such increasing sequence of indices i[1], i[2], ..., i[k]...

View Article

DBOY: Getting wa

I am getting a wrong answer for the practice problem DBOY. Can anyone tell me the problem with my solution?.Please tell me test cases where my code fails.

View Article


Will CodeChef provide test cases

It would be very good if CodeChef could provide a detailed set of test case for a given problem and at what particular test case did a particular code fail. This would be a really good initiative on...

View Article

what data is preferred?

Implement a data structure (of N strings) using an dynamic array to support the followings • Satellite data are of string type • O(logN) time Addition(string X) // If X is in the DS then increment its...

View Article

DIGJUMP TLE

I tired about 70 times this question, resulting in TLE. Has anyone got an O(n^2) solution accepted ?. Just a yes or no is required.

View Article
Browsing all 39796 articles
Browse latest View live


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