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

FUNC: TLE problem

Even after aborting the calculation of root once it becomes 1. That leads to maximum 60 calls to the root function, no matter what N is. Since, (10^18)^(1/60)=1. Still I am getting TLE. Please help...!...

View Article


Factorial and trailing non zero digit

wirte a program to find the last non-zero digit of factorial of a number

View Article


JAVA operation of left shif

This is a java prg pls make me understand why on left shifting 2 by 32 it o/p 10class hi{public static void main(String args[]){ int a; a=2<<32; System.out.println(Integer.toBinaryString(a)); } }...

View Article

Find out two number from a series which is composed by these two numbers

series 7,9,79,97,77,99,777,999

View Article

problem in code??..........you can run this code of c++ and test all the...

include<iostream>using namespace std; int main() {int t,n; string s; scanf("%d",&t); while(t--) {scanf("%d",&n); string a,b; int countb=0; int countl=0; for(int i=0;i<n;i++)...

View Article


algorithm please!!

Design a program that finds all numbers from 1 to 1000 whose prime factors, when added together, sum up to a prime number (for example, 12 has prime factors of 2, 2, and 3, which sum to 7, which is...

View Article

Help Understanding TCs for MAXPR

Do indices matter in case of sub-sequences in the problem? Suppose "1 1 1 1 2" is a sequence then, only "1 1 2" is not an AP. But is it counted only once or all the combinations of the same...

View Article

same stratergy working in C but not python. What could be the reason

Getting runtime(nzec) error for solution submitted in python whereas similar approach worked in C. Am I missing something that in python. The solution for http://www.codechef.com/problems/DCE05 in...

View Article


ODDBIN - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYMEDIUMEXPLANATIONNotation-------- Let C(n,r) represent the binomial coefficient of choosing r items out of n.Let BitSet(n) = { i | 2^i is used in the binary...

View Article


TLE on oddbin

May I ask why is my solution getting TLE? I generated a few random test cases and my solution seems to run within 2 * time use by setter's solution. Below is my solution. http://pastebin.com/ECdkfk9r

View Article

TLE when throwing >= 1 darts for training in the DARTS problem [June 2014...

After the current change in the judge for the DARTS challenge problem from the June 2014 long contest, the judge is more broken than before.As far as I understood, the initial version of the judge was...

View Article

Approach for PRIMEDST

For the question http://www.codechef.com/AUG13/problems/PRIMEDST , I read the editorial but just want to check if the approach i thought is correct or not:Taking all vertices as root in each turn and...

View Article

WA in SPOJ-BOTTOM

In the question http://www.spoj.com/problems/BOTTOM/ i am regularly getting a wrong answer. I am trying to modify Targans Algorithm for Connected Components. This is my code http://ideone.com/Qe6BmJ My...

View Article


Feature request

It would be nice if codechef had a feature where we could see all the people from our particular organization/institution only.

View Article

Just reevalute FUNC

i sent some corner cases of FUNC at feedback@codechef.com but i don't see any positive response related to rejudge of FUNC ................i already put these cases on forum but deleted by someone ......

View Article


implicit calls ??

why the implicit call to EXIT() and clrscr() are marked as error ?please have a look at my code , and there are errors as per the codechef's compiler !include<stdio.h>void f1(); void f1() { int...

View Article

How to iterate hashmap with highest String key value

HashMap<string, string=""> mapp=new HashMap<string, string="">(); mapp.put("ab","blue"); mapp.put("abc","black"); mapp.put("abcef","black"); mapp.put("abcd","pink"); for (Iterator it =...

View Article


WA in NAME2

#include<iostream> #include<algorithm> using namespace std; class test{ public: string f,l; }; bool ispresent( char ch , string &k ) { for(int i=0;i<k.size();i++) { if(k.at(i)==ch)...

View Article

find size of array without using sizeof() function

on internet i found tht above mention method works fine only for int type of array but if array of ptr is there or other case it wont work,there people r suggesting to use array container and using its...

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 dosen't work .

View Article
Browsing all 40121 articles
Browse latest View live


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