Quantcast
Browsing all 40121 articles
Browse latest View live

HOTEL-what does the prob mean??

I'm unable to get the question as in what it wants??...unable to understand it Here's the link - http://www.codechef.com/problems/HOTEL

View Article


stringhandling

char a[20]="codechef"; printf("%d",a);//what is the output?

View Article


how to test as i use visual studio

how to test my c programs from command line as described here http://www.codechef.com/wiki/faq#How_should_I_test_my_programI don't see a way to do that as i am using visual studio. I want to test ,my...

View Article

How to use fflush(stdout)

I want to know how to use fflush(stdout) as I haven't used this before and I am facing problem.can anyone please give a sample code to use it. in june challenge one has to use it in solving DARTS501...

View Article

C++11 , just a pretty face?

Okay, so i have been checking upon my old submissions, finding new ways to optimize them, i came across with these unusual thing, While i truly follow C++11 for my programming, it seems that there are...

View Article


Where can I find upcoming contests on codechef?

I want to see the upcoming contests, but there is no option on the site.

View Article

whats wrong with this code ? for "Life,the Universe and Everything" Question

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

View Article

why am i getting sigsegv error everytime?

my code for turbo sort is #include<iostream> using namespace std; int main() {int a[100],i,t,j,c; cin>>t; for(i=0;i<t;i++) { cin>>a[i]; } for(i=0;i<t;i++) { for(j=0;j<t;j++)...

View Article


Transform the Expression - WA

#include <stdio.h> #include <ctype.h> int main() { int t; scanf("%d", &t); while(t--) { char expression[400]; expression[0] = '\0'; scanf("%s", expression); char operatorStack[400];...

View Article


Forgot password...plz consider @admin ...and check my code for your test...

i have tried all possible test cases....... plz check from my submissions...n REPLY @admin

View Article

PLZ HELP TO GET THE OUTPUT FOR THIS PROGRAM

include<stdio.h>include<conio.h>include<stdlib.h>struct node{ int data; struct node *next; };void insert(struct node h) { struct node t,l; int d; t=(struct node)malloc(sizeof(struct...

View Article

CHMOD - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYPREREQUISITESSimple Math, Repeated SquaringPROBLEMYou are given a list of N integers.Each value in the list is between 1 and 100.You have to respond to T...

View Article

Facebook application

It is necesary to have a webspace to build a facebook application for any platform.?

View Article


wrong answer for spoj problem gss1

i dont know why this is giving wrong answer , it works perfectly fine on my machine bt still wrong answer ...please suggest any test case or help me find the bug in the code . Here's the link...

View Article

getting WA in FUNC..

enter code here #include <stdio.h> include <math.h>include <stdlib.h>define mod 1000000007long long b[61]; void fill(long long x) { int flag=1,i=1; while(flag) { if(i==1) b[i]=x; else...

View Article


DIGJUMP WA Implemented as per editorial.

//http://www.codechef.com/viewsolution/4080130I have made correct implementation as per the solution provided above, taking care of all corner cases. But it still gives me WA. Please help.include...

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


CHEFZOT - Editorial

PROBLEM LINK:PracticeContestTester:Shiplu HawladerEditorialist:Praveen DhinwaDIFFICULTY:CakewalkPREREQUISITES:processing of arraysPROBLEM:Given an array A. Find maximum length of sub-array with product...

View Article

TLE in MAXPR

Why is the following solution giving TLE? http://www.codechef.com/viewsolution/4032512

View Article

Help in Digjump code....

My logic involves searching for n-1 and n-2 elements in the array, making their jump counts 1 and 3 respectively. Then i start from n-1 and using dp, i check for i+1th, least jump count of same digit...

View Article
Browsing all 40121 articles
Browse latest View live


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