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

Getting wrong answer on CodeChef?

I am new to codechef.I'm competing in August challenge.All the questions run successfully in my pc and gives the answer according to the question but whenever I submt them codechef says wrong answer.Am...

View Article


Python or C

Hey all ,recently I started out my journey in codechef and the thing that struck me the most was that code written in C took very less time to execute.As Iam just a beginner I tend to stick to python...

View Article


holes in a text

http://www.codechef.com/viewsolution/2375372 this is my solution to the holes in a text problem.Could anyone please tell me whats wrong?

View Article

TAPALIN - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYSIMPLEPREREQUISITESSimple Math, Matrix ExponentiationPROBLEMFind the number of palindromic strings that can be made of length N, or less.QUICK EXPLANATIONWe can...

View Article

Quick sort

Please help me out. I am not able to get output for my quick sort programe. Code is given belowinclude<stdio.h>include<stdlib.h>include<math.h>void merge(int arr[],int minm,int...

View Article


how to solve np problems??

Hello,how to solve NP- completeness problems like travelling salesman problem,finding the minimum set in the given numbers.i need some explanation of how do i guess the solution of that problem??thank u

View Article

Institution/Company based filter

Is it possible to filter profiles of colleagues/friends from same company/institution and view the same ??

View Article

TWTCLOSE - Editorial

PROBLEM LINKS:PracticeContestDIFFICULTYCakewalkPREREQUISITESBasic string reading, using arrayPROBLEMThe problem essentially is to maintain binary (open(1) or close(0)) state of N tweets and simulate K...

View Article


Help me in Finding Length of an Integer Array in C...!!!

Recently I am having problem in finding Length of an Integer Array in C program.Here is the case.Consider in main() I have taken one integer array called a[]={1,2,3,4,5}; and Now I am passing this...

View Article


Number of Instructions that can be acceptable in 1 second

I am going through a question on codechef, and wondering how much complexity would be accepted. Time limit is 1 second. Can O(NlogNlogN) pass? N<10^5

View Article

AC versus TLE

Dear admin,Why is it the case that the same code gets accepted on one submission and is adjudged TLE on another submission??Of course, I had tuned some parameters in my program, so that it will finish...

View Article

knowing running time from given algorithm complexity

Hi guys, let's say we know our algorithm complexity, so we know how many operations(give or take) our program will do, but how to know if it will stand in the time limits?Let's say we algorithm with...

View Article

Looks like Scala compiler is misconfigured

Submission: http://www.codechef.com/viewsolution/2491335 result: /spoj/scala_compile: /opt/scala/bin/scalac: /usr/bin/env: bad interpreter: No such file or directory spoj: The program compiled...

View Article


how is my ans wrong ?

//atminclude<iostream>using namespace std; int main() { float bal=120.00; int i,j; float rec; cout<<"\n Your current balance is 120 Rupees only ! \n Enter your withdrawal Amount ";...

View Article

Compile time error resolution.

How am i suppose to save the ans in a file named after the public class.

View Article


FCTRL:Getting Wa

#include<stdio.h> #include<math.h> int main() { unsigned long int k,n,i,sum=0,t; float z; scanf("%ld",&t); while(t>0) { i=1; sum=0; scanf("%ld",&n); while(pow(5,i)<=n) { k=i;...

View Article

Packing the Golden triangles

Can someone please provide me a good test case to check my solution of the problem "Packing the Golden triangles"(Easy section) ?I tried to form some myself and my code is giving correct results for...

View Article


Why do I get a Compilation error?

i have tested this code on my computer while using Turbo c++ . but this is not compiling in c++ 4.0.0-8.#include<iostream.h> #include<conio.h> void main() { int x; float y; cin>>x;...

View Article

MOU1H - Editorial

PROBLEM LINKPracticeContestDIFFICULTYMEDIUMPREREQUISITESSuffix Array, LCP ArrayPROBLEMYou are given a sequence of heights. You wish to find the number of unique contiguous subsequences in heights, such...

View Article

COUPON - Editorial

Author: Vamsi Kavala Tester: Roman Rubanenko Editorialist: Bruno OliveiraPROBLEM LINKSPracticeContestDIFFICULTYSimplePRE-REQUISITESSimple Math, Dynamic ProgrammingProblem:You are shopping to buy N...

View Article
Browsing all 40121 articles
Browse latest View live


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