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

Wrong ans TACHEMIS

http://www.codechef.com/problems/TACHEMIS/I am getting a wrong answer everytime but I have checked a lot of cases and the code runs fine on them Can anyone help me regarding this. Thanx in...

View Article


VOTERS : Getting Wrong Answer

I Have Checked All The Possible Cases For My Code And It Getting Right On My Machine But Here It's Showing Wrong Answer Each Time I Have Submitted My Code.Please Help Me Out To Mark The Error In It....

View Article


PROB - Editorial

PROBLEM LINKPracticeContestDIFFICULTYSIMPLEPREREQUISITESSimple MathPROBLEMYou are given 3 types of tickets.A tickets of type 1, the winning ticket B tickets of type 2, the losing ticket C tickets of...

View Article

Help in Sieve of Eratosthenes algorithm

This code is for finding prime with the help of Sieve of Eratosthenes algorithm. I tried to manage memory for the program so instead of declaring large element arry i used calloc function.But when i...

View Article

FARASA - Editorial

PROBLEM LINKPracticeContestDIFFICULTYHARDPREREQUISITESFast Fourier TransformPROBLEMYou are given an array of N positive integers. There are N+1C2 sub-arrays of this array. Find the number of unique...

View Article


Plz help me with this problem.

Maximum Absurdity this problem was asked in Codeforces Round #193 (Div. 2). Plz anyone tell me what is the approach for solving this problem?

View Article

Sum In a Triangle SIGSEGV Error

Hey guys, I have been trying to solve the sums in a triangle problem. Here's the code:#include<iostream> using namespace std; int a[10][10],j,k; int func(int &n,int &r) { int large[10];...

View Article

An interview of ACRush with Google Code Jam team

ACRush chatting about programming, strategies and more.. here is the link

View Article


References for learning C

Hello, I have a reasonably knowledge regarding java and I would like to learn the C language, it's just curiosity and I want to have a better understanding of the lower level languages (comparing to...

View Article


HOLES - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATION You just simply need to do what is mentioned in problem statement. Just note that only letter “B” has two holes, and only letters “A”, “D”, “O”,...

View Article

RESQ - Editorial

PROBLEM LINKS:PracticeContestDIFFICULTY:SimplePREREQUISITES:Math, Prime FactorizationPROBLEM:The aim is to find two numbers x and y such that x * y = N and |y – x| is as small as...

View Article

NPIN - Editorial

PROBLEM LINKPracticeContestDIFFICULTYHARDPREREQUISITESComputational GeometryPick's TheoremCyrus Beck's Line Clipping AlgorithmSweep Line AlgorithmLine Segment IntersectionPROBLEMYou are given a convex...

View Article

Birthday Candles

I cannot seem to find the problem with my code. Any help will be appreciated. http://ideone.com/XTkzOC

View Article


there is some problem with the solution of COINS question

#include<stdio.h> int main() { int n[20],n1=0,n2=0,n3=0,i,len=0; len=sizeof(n)/sizeof(int); printf("pls enter any %d number:\n",len); for(i=0;i<len;i++) { scanf("%d",&n[i]);...

View Article

getting wrong answer in SPOJ problem UCV2013J

here is my code / Valences submitted by Arjun Mishra /include<iostream>include<string.h>include<math.h>using namespace std; long long int A; long long int compare[21]; void function()...

View Article


DRANGE_Wrong Ans

I have tried a number of test cases but i still i cant figure out my mistake.Please help.Code link is below : http://www.codechef.com/viewsolution/2403899Also when i was through some of the successful...

View Article

Small improvements for code chef

I was thinking of what improvements can be done to code chef without some big effort like a new feature but just some small tweaking . I came up with the following list : 1. Include global time...

View Article


what is the best way to learn hash?

hi how can i learn hash? what is the best link????

View Article

SIGSEGV error in linked-list swapping

Got SIGSEGV error in this function which basically swaps every two numbersvoid swap(struct node *head){ if(head == NULL || head->next == NULL) return; struct node *temp = head,*temp1 =...

View Article

CHRECT - Editorial

PROBLEM LINKPracticeContestDIFFICULTYCAKEWALKPREREQUISITESAd HocPROBLEMYou are given a grid of R rows and C columns. The rows are numbered from 1 to R from top to bottom. The columns are numbered from...

View Article
Browsing all 40121 articles
Browse latest View live


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