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

WA in KAN13C

Can u explain why this code is giving WAinclude <stdio.h> include <stdlib.h> include <string.h> int main() { char str = (char ) malloc(4 * 1000000 * sizeof(char)); int asv = (int )...

View Article


icpc kanpur problem G

Can anyone please tell why my code is giving WA??? http://www.codechef.com/viewsolution/3099344

View Article


problem while submitting

hello!! since past few days whatever submissions i make..i dont get to see the outcome of it...it shows running after submission for a very long time..and then i have to see in my submissions to see...

View Article

run time error while printing strings.

Why this small simple code not giving the o/p. http://ideone.com/JAQr4U Also declaring the string like char left[4]={'0','0','0','0'}; gives rte!!http://ideone.com/ReyEq9 y so?? Its a part of one of my...

View Article

The palindrome Game

My code is getting wa...can anyone spot out the test case for which my code doesnt work?http://www.codechef.com/viewsolution/3104883http://www.codechef.com/problems/I13TPG/

View Article


CHODE - Editorial

PROBLEM LINK:PracticeContestAuthor:Vitalij KozhukhivskijTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:CakewalkPREREQUISITES:Programming LanguagePROBLEM:Given a simple encryption method using the...

View Article

Image may be NSFW.
Clik here to view.

RECTQUER - Eidtorial

PROBLEM LINK:PracticeContestAuthor:Roman RubanenkoTester:Gerald AgapovEditorialist:Jingbo ShangDIFFICULTY:EasyPREREQUISITES:Prefix sumPROBLEM:Given a N*N matrix of at most 10 different numbers, answer...

View Article

Image may be NSFW.
Clik here to view.

QTREE6 - Editorial

PROBLEM LINK:PracticeContestAuthor:Minako KojimaTester:Gerald AgapovEditorialist:Jingbo ShangDIFFICULTY:HardPREREQUISITES:Link Cut Tree, Heavy-Light DecompositionPROBLEM:Given a 0/1 colored tree of N...

View Article


Input String with spaces

How can I input a string in C with spaces. I know gets and scanf("%[^\n]s") are possible answers but they are not accepted by command line text input files with redirection operators. Plz answer?

View Article


getting wrong answer ambiguous permutation help

include<iostream>using namespace std;int main(){int a[100000];unsigned long int b;unsigned long int c;unsigned long int x;unsigned long int l=0;while(b!=0){scanf("%d",b);if(b!=0){for(int...

View Article

Image may be NSFW.
Clik here to view.

A tutorial on Suffix Arrays

Hello @all,This text will focus on the construction of Suffix Arrays, it will aim to explain what they are and what they are used for and hopefully some examples will be provided (it will be mainly...

View Article

Getting WA on a cake-walk simple problem. Please help!!

I read the Editorial. It's basically the same thing. Still getting WA. I'm very confident that the code is correct :( Please please review. My life is at a standstill :(Problem:...

View Article

MARBLES december long 2k13

can some one give a test case for which my program fails i tried many times while the contest was on. http://www.codechef.com/viewsolution/3066054

View Article


Using fflush gives WA

These two codes are the same: code1 and code2, the only difference being that I have used fflush(stdin) in the second code to omit the newline character while taking two strings as input one after the...

View Article

problem creation of liste

#include<stdio.h> #include<stdlib.h> typedef struct cell cell; struct cell { int info; struct cell *suivant; }; int main() { cell *P,*liste; int n,i; printf("donner le nombre d'element");...

View Article


Holes in the text..wrong answer..please help

Can someone please tell me what is wrong with this code. It always shows a wrong answer. Thanx in advance..Below is the code : -#include <iostream> #include <cstring> using namespace std;...

View Article

KPRIME - Editorial

PROBLEM LINKPracticeContestDIFFICULTYSIMPLEPREREQUISITESSieve of EratosthenesPROBLEMA number is called a K-prime if it has K distinct prime factors.Find the number of K-prime numbers between some given...

View Article


SRM 601 clashing with Cook Off

Hey,SRM 601 is also on 22nd december and the time is clashing with cookoff.Can time of cookoff be changed??

View Article

TLE for O(R+log Q) but not for O(Q)? MARBLEGF Problem

My submission for the MARBLESGF prob(Dec13 Long) was based on the idea that I store the initial sum a[o] to a[i] in s[i], and then keep a track of all the changes made, so that whenever sum is asked...

View Article

REALSET - Editorial

PROBLEM LINK:PracticeContestAuthor:Iaroslav TverdokhlibTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:HardPREREQUISITES:Circulant MatrixPROBLEM:Given a Circulant Matrix, determine whether it is full...

View Article
Browsing all 40121 articles
Browse latest View live


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