how to get atleast 50 points in eulersum? what is wrong in my approach? how...
i got AC in 2 subcases of TASK-1,i think this is due to precission loss,anything wrong with my approach?my code->class eulernumber {public static void main(String[] args) { Scanner sc=new...
View ArticleLOCMAY2017
I got an email 2 days back from loc@amrita.edu that I had won a T-Shirt for getting the 31'st rank in LOCMAY2017. When I went to the site mentioned in the description, it mentioned that the prizes are...
View ArticleUNIONSET - A Simple Approach
PROBLEM LINKPracticeContestCONTEST PANELAuthor:admin2DIFFICULTYEASY PROBLEMGiven N sets whose elements range from 1 to k, find the number of pairs among those N sets which contain all elements ranging...
View ArticleUNIONSET Doubt
link to question : https://www.codechef.com/JUNE17/problems/UNIONSETMy code gives only 40 pt for Unionset when i do it using set based approach in which i take union of two set by putting element of...
View ArticleHow to solve CLONEME(JUNE17) for 30 and 100 pts?
What is the approach to solve CLONEME for 30 and 100 pts?
View ArticleEuler Sum- Probable approach
After heaving goggling, I found a link in which approach of solving sum of floor functions is given. Due to lack of time I was unable to code it. Had anyone solved with this approach and getting all...
View ArticleCan anyone help me with SUMQ from JUNE17 ?
I tried really hard for this problem but kept getting WA till the end (though i got partial points using brute-force). Here's what I tried : https://www.codechef.com/viewsolution/14076399
View ArticleNEO01 - EDITORIAL (Unofficial)
PROBLEM LINKPracticeContestCONTEST PANELAuthor:neo1tech9_7PREREQUISITESBasic Math DIFFICULTYEASY PROBLEMAn array with N elements (both positive and negative) is given, a term happiness is defined as...
View ArticlePRMQ JUNE17 how do I optimize my solution for this problem
My approach was simple just to sieve out all numbers 2 to 10^6 and keeping the lowest prime factor ,then I can get the sum of powers of primes in range X and Y for that particular number. my code was:...
View ArticleJOHNY - Editorial
PROBLEM LINK:PracticeContestDIFFICULTY:CAKEWALKPREREQUISITES:NonePROBLEM:Given an unsorted array of unique elements, find the position of a specified elements in array’s sorted form.QUICK...
View ArticleDoes CodeChef have any Code Of Conduct?
I am new to CodeChef. I am not sure what can be considered as an improper conduct on this website. I do not want to be penalized for doing something unknowingly which is not the accepted behavior. Is...
View ArticleWhy TLE in Triplets ( SUMQ ) ?
I got 30 points in the problem Triplets ( SUMQ ) from the contest JUNE17.My solution in c++My solution in javaHow can I optimize my code more than this? One more thing, I noticed that I got TLE in only...
View ArticleES - Editorial (Unofficial)
PROBLEM LINK:PracticeContestAuthor:Gaoyuan ChenEditorialist:Tiny WongDIFFICULTY:HARD. PREREQUISITES:Beatty sequence,Continued fractions.PROBLEM:Given $n \leq 10^{4000}$, calculate the sum $$...
View Articletrees using stl
hi all...i have learned about tree DS and im comfortable in writing code using structures for tree traversals (almost all tree basic problems )...but its taking a lot of time ....so i need to know how...
View ArticleEuler Sum Editorial (Unofficial)
Problem Linkcontest linkpractice linkPREREQUISITESBeatty Theorem Solution The question is based on Beatty TheoremUsing the above theorem , for given irrational number alpha , you can calculate the the...
View ArticleCLONEME Editorial (Unofficial)
Problem LinkContset LinkPractice LinkPrerequisitesBinary SearchQuick OverviewGiven an array and two ranges you need to find whether the subarray lying in these two ranges have mismatch of less than 1...
View ArticleCLEANUP - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONNo real tricks here. An easy approach is to create a boolean array b[] of size n where item b[i] is true if and only if i does not appear in the...
View ArticleRuntime Error (NZEC) in PRMQ
I am getting Run Time (NZEC) Error in the Codechef June Challenge 2017 question Chef and Prime Queries. The link to the question is : Chef and Prime Queries.For subtask 1, it is working fine. Can...
View ArticleSBTR "Smallish" subtask help (JUNE17 Challenge Problem)
Link to Problem (Contest, Practice)I did a randomized tree construction algorithm and bombed the complement graph, with heavy pruning and bit counting, magic compression, and solved most of the exact...
View Article