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

SQRT DECOMPOSITION (Suggestions needed on improving the code)

int main() { int a[]={1,5,2,4,6,1,3,5,7,10};//example array int n=sizeof(a)/sizeof(a[0]); int BLOCK_SIZE=sqrt(n); int BLOCKS=ceil(sqrt(n));//handles if n is not a perfect square int b[BLOCKS]={0};//ith...

View Article


Buying Sweets :Solution ?

Buying SweetsSachin likes sweets a lot. So, he goes to a market of sweets. There is a row of sweet stalls. Every sweet stall has different sweets. To save some time, he decided to buy sweets from...

View Article


TYTACTIC - Editorial

Problem Link:PracticeContestDifficulty:SimplePre-requisites:dfs, range sum queriesProblem:You are given a rooted tree T, associate with each vertex v a weight skill[v]. Also given are a set of queries...

View Article

help in...

my solution : https://ideone.com/vrUUHpit is simple brute force but i didn't able to figure out why my solution gives runtime error (:please help !

View Article

Unclear Language in November Long Challenge Question CHEFHPAL

Here's the link to the question https://www.codechef.com/NOV17/problems/CHEFHPALThe thing is if A were to be equal to 1 and let's say N=5 Will the output be 5 aaaaa ? or something else ? This help...

View Article


Range Update in BIT

Is it possible to update a range in Binary Indexed Tree...?? I want this to solve the http://www.codechef.com/problems/FLIPCOIN problem using Binary Indexed Tree(BIT).

View Article

BIT - Range update and point query

I read this article - KartikKukreja's blog. I clearly understood the point update and range query,but couldn't understand the range updates. For updating the range a to b , the following code is used -...

View Article

RAINBOWA - Editorial

PROBLEM LINK:PracticeContestAuthor:Dmytro BerezinPrimary TesterPrateek GuptaEditorialist:Hussain Kara FallahPROBLEM EXPLANATIONA rainbow array of n elements follows the form {1 (repeated a1 times), 2...

View Article


How many Number of operations are accepted on Codechef under 1 sec ?

Also what would be the greatest upper-bound function of time complexity that would run in under 1 sec ?

View Article


Doubt: ADAGCD(Ada and GCD) on Spoj

Problem Link: Spoj problemCode:https://ideone.com/2afY09Approach: finding all the possible prime factors of the 1st number, and storing them in a map(map1) and for subsequent numbers inserting them...

View Article

Please help in this past ICPC problem

problem link : https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=6083my solution : https://ideone.com/vrUUHpit is simple brute force but...

View Article

LIKECS02 - Editorial

Problem LinkPracticeContestAuthor:Bhuvnesh JainTester:Hasan JaddouhEditorialist:Bhuvnesh JainDifficultyEASYPrerequisitesMaths, Looping Techniques, Constructive AlgorithmsProblemConstruct an array of...

View Article

CHEFFA - Editorial

PROBLEM LINK:PracticeContestAuthor:Dmytro BerezinTester:Prateek GuptaEditorialist:Hussain Kara FallahPROBLEM EXPLANATIONChef has an array consisting of N elements. Chef may pick any 2 adjacent elements...

View Article


How to improve the competitive programming scenario in India

Hi CodeCheffers,We want your feedback regarding how to improve the competitive programming scenario in India. The feedback is required for improving not also the levels of lower skilled/rated...

View Article

"I want to ask a question" - Ask them all here!

Hello guys,As you all are aware, many times there are genuine users who wish to ask a question, but dont have karma for it. They then, have to resort to means of either asking their question in other...

View Article


NOV17 Challenge

When will be the challenge problem posted? Will be the contest longer because of the delay?

View Article

when will acm icpc 2017 online results will be published?????

when will ACM ICPC 2017, Online Preliminary Round online results will be published?????

View Article


ACM ICPC 2017 Online Round Solutions discussed on maths stackexchange

It took my team the fortune to figure out the solution for 2nd and 3rd problem. Ohh dear maths. And after the contest I came to know the solutions for them were already posted on Maths StackExchange.Is...

View Article

Getting TLE for TYTACTIC even after using BIT(Fenwick Tree)

I have used fenwick tree to solve the TYTACTIC question but I'm still getting TLE! My solution link

View Article

Why do I get a SIGSEGV?

Why I am getting a runtime error SIGSEGV in the problem? Where I am going wrong?

View Article
Browsing all 39796 articles
Browse latest View live


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