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

SPOJ PROBLEM LIS2

Can someone provide some hint for solving this prbolem of spoj www.spoj.com/problems/LIS2/. The approach I am trying is very similar to the LIS dp solution(O(Nlogn)). But my solution doesnot give...

View Article


Image may be NSFW.
Clik here to view.

Testing, DO NOT RESPOND

View Article


prime generator using sieve algorithm

Question->http://www.codechef.com/problems/PRIME1 My code is giving correct answer for all the test cases i have tried .Also for the extreme case i.e when m=999900000 and n=1000000000 it running...

View Article

Image may be NSFW.
Clik here to view.

Animated DIGJUMP Editorial

Problem Statement: http://www.codechef.com/JUNE14/problems/DIGJUMPThis is my first Animated Editorial , Sugessions are welcome :)

View Article

Segmentation fault in SUMTRIAN

#include<iostream> using namespace std; class test{ public: int a[101][101], n; int cache[101][101]; void input(); int calc(int ,int); test(){ for(int i=0;i<101;i++) fill_n(cache[i], 101,...

View Article


DOWNLOAD - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYMEDIUMPREREQUISITESBinary Index Tree , sorting , coordinate compressionPROBLEMThe problem statement is simple. We are given N intervals on 1D axis and asked Q...

View Article

wa again and again

http://www.codechef.com/problems/WORDS1http://www.codechef.com/viewsolution/4148266My code is not working for the case in which there is repetion of a string plz help what can i do to rectify my...

View Article

NUMFACT - Editorial

Author: Vamsi Kavala Tester: Roman Rubanenko Editorialist: Bruno OliveiraPROBLEM LINKSPracticeContestDIFFICULTYCakewalkPRE-REQUISITESSimple Math, Integer FactorizationProblem:You are given a very large...

View Article


FUNC - Editorial

PROBLEM LINK:PracticeContestAuthor:Vivek HamirwasiaTester:Shiplu HawladerEditorialist:Praveen DhinwaDIFFICULTY:MediumPREREQUISITES:number theory, binary searchPROBLEM:You are given an array A. You are...

View Article


C++ Vs Java in contest

As i am a java user . Is there any advantage of learning C++ for programming contest?

View Article

COUNT OF MAXIMUM REPEATING ELEMENT IN THE ARRAY

how to find the count of an element which repeats maximum number of times in an array if the array contains both positive and negative elements in most efficient way ? in O(n)?

View Article

SEAARC - Editorial

PROBLEM LINK:PracticeContestAuthor:Sergey NaginTester:Shiplu HawladerEditorialist:Praveen DhinwaDIFFICULTY:HARDPREREQUISITES:combinatorics, binary indexed trees, sqrt decomposition.PROBLEM:You are...

View Article

Why my Python Code is showing RUN TIME ERROR(NZEC)

My code is showing Run Time Error(NZEC) for the question WORD VERSEMy Code -test = input()for i in xrange(0,test): x = raw_input() a = x.split() s ="" for j in xrange(len(a),0,-1): s = s+a[j-1]+" "...

View Article


Reverse polish notation problem

question-->http://www.codechef.com/problems/ONP My solution is working fine on ideone as well on my system and giving right answer for test given.But it is giving wrong answer on submission. I m...

View Article

d query spoj

Was trying to solve http://www.spoj.com/problems/DQUERY/ but could not get it how to solve it , though i know Segment tree and have read solution...

View Article


COMPILER - Editorial

PROBLEM LINK:PracticeContestAuthor:Bruno OliveiraTester:Sergey KulikEditorialist:Lalit KunduDIFFICULTY:EASY PREREQUISITES:AD-HOC PROBLEM:Given a bracket sequence, print the length of largest prefix...

View Article

ANUSAR TLE

I am getting TLE for this problem: http://www.codechef.com/problems/ANUSAR/Don't know why, with my understanding my solution is O(nlogn). But still TLE.I have used the suffix array implementation in...

View Article


Hackerrank Addepar

Hackerrank Addepar has started now. Contest duration is 8 hrs. HURRY UP: https://www.hackerrank.com/addepar

View Article

Conversion of float to long int

In a problem on some other judge, Im required to convert a floating point number to the long integer data type. The floating point number is 400330.096752 and on conversion to long int by explicit type...

View Article

turbo sort in c

#include<stdio.h> int main() { int t,a[10^6]; int i,j,temp; printf("\n enter the no. of test cases"); scanf("%d",&t); for(i=0;i<t;i++) { scanf("\n%d",&a[i]); } for(i=0;i<t;i++) {...

View Article
Browsing all 39796 articles
Browse latest View live


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