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

blocking game getting wa

hey guys this is my code and im getting WA ...... can anybody help me >????? problem : http://www.codechef.com/problems/BLOCKINGmy code http://codepad.org/xkTAiJIKthnx in advance

View Article


i managed to learn c. now what should be my next step?

i am a beginner. i have finished learning c. what should be my next step??

View Article


factorial(n) /factorial(r1) factorial(r2)...factorial(rk)

ans = factorial(n) /factorial(r1) factorial(r2)...factorial(rk) where r1+r2+...+rk= n how to calculate this vale when n is large?I want the ans mod 1000000007 value any suggestions will be appreciated

View Article

randomized select

can anyone give me the iterative version of randomized select for finding the ith smallest number

View Article

finding median

i was studying selection in a worst case linear time algorithm which guarantee a good split in RANDOMIZED select to find ith smallest number. i am curious to know why it is so necessary to find median...

View Article


pemutaion

can you give me a C++ program for calculating (n!/(p!q!r!)) where n,p,q,r are in the range of 100000... thanks in advance....

View Article

A humble request to all On-line IDE users!

This is just a request to all the ideone users or users of ne such online IDEs..please keep the visibility of your codes to user's so that no1 can search for it..this is just to avoid cheating cases in...

View Article

ATM question

include<iostream>include<iomanip>include<math.h>using namespace std; bool check(int x) { if(x%5==0) return true; else return false; }float withdraw(float balance, int amt) { return...

View Article


pls help me to find mistake

include<iostream>include<iomanip>include<math.h>using namespace std; bool check(int x) { if(x%5==0) return true; else return false; }float withdraw(float balance, int amt) { return...

View Article


uva chemical attraction getting WA

okk i think this is a very hard problem.... coz only 17 people ever succeeded to get AC...problem...

View Article

NQUEEN problem

hii guys,i am trying to to do N-queen problem in which i have a function Place(k,i) which returns true if a queen can b placed at the K'th row and i'th column but am facing problem in understanding the...

View Article

help please

help in writing code to evaluate the foll. 4 : {1 1 1 1 , 1 2 2 , 2 1 2 , 2 2 1 , 1 3 , 3 1} size: 6 3 : {1 1 1 , 1 2 , 2 1} size: 3 2 : {1 1} size: 1

View Article

Concatinating Two Strings

#include<stdio.h> #include<conio.h> void main() { char a[25],b[25]; int i, j, k=1; puts("Enter the string A"); gets(a);fflush(stdin); puts("Enter the string B"); gets(b);fflush(stdin);...

View Article


python NZEC error

import math; T=int(raw_input()); a=[]; for i in range(T): a=raw_input().split(); N=int(a[0]); M=int(a[1]); K=int(a[2]); n=math.factorial(N+M-2)/(math.factorial(N-1)*math.factorial(M-1));...

View Article

how to center align a number using printf

if 1 is given output=" 1 " if 12 is given output=" 12" if 123 is given output="123" thank you

View Article


Not able to submit in July Challenge

I am not able to select language in MountHoliday question in ongoing July challenge.Thus i am not able to submit.Please rectify this error ASAP.Thanks.

View Article

decreasing runtime

hii guys,just wanted to know is there any other way other than BufferedReader or Scanner to make java program faster if yes will it make any difference in codechef submission and what time difference...

View Article


Help to me get right answer

i am solving chef and walking the rectangle problem of july 2013 challenge but i am getting wrong answer.Help to me correct my answer .This is my submission http://www.codechef.com/viewsolution/2329629...

View Article

SIGSEGV error

problem: http://www.codechef.com/problems/PRIMES2solution: http://www.codechef.com/viewsolution/2329374plz rectify this..

View Article

why the program showing runtime error ??

#include<stdio.h> int main() { int i; scanf("%d",i); while(i != 42) { printf("%d",i); scanf("%d",&i); } return (0); }

View Article
Browsing all 39796 articles
Browse latest View live


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