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

Discussion for PERMUTE

Please provide explanation and logic behind the problem.

View Article


Turbo Sort

i am getting wrong answer but it runs fine in my netbeans compiler ...import java.util.Scanner; class tsort { private int[] numbers; private int number; public void sort(int[] values) { // Check for...

View Article


Buy 1-Get 1 Wrong answer...!!!

http://www.codechef.com/problems/BUY1GET1 Above is the probelm of codechef, i tried to solve. I wrote the following code running perfectly fine on my laptop. Tried hard, but can't find any eroor for...

View Article

TETRA : Wrong Answer

please help.......i'm getting wrong answer. i don't know wats wrong with the code . Here is the link to my solution Click here

View Article

reversing array for conversion to binary number

I'm looking to perform the decimal to binary conversion...how do I reverse the binary code stored in str[i], marked in asterisk so that I get the correct output ??#include <stdio.h> #include...

View Article


W String: What is wrong in this code..please help.

link to my solution: W string

View Article

virtual machine

i have a virtual machine that runs on fedora and i dont have conio.h as a header file in my library. could sombeody outline the exact procedure to download and include it in my library filesthank you...

View Article

'THE MORNING COMMUTE'

from sys import stdin from math import ceil for i in range(int(input())): n=int(stdin.readline()) xi,li,fi=map(int,stdin.readline().split()) t=xi-0+li xa=xi+li for j in range(n-1):...

View Article


Getting 'Time limit exceeded' for the problem NOTATRI. Please help. What's...

include <iostream>using namespace std;int main() { unsigned long int i, x, y, z, counter = 1, a, b, c, ans=0;int n; cin >> n; while(n>0) { unsigned long int arr[n]; for(i=0;i<n;i++) {...

View Article


CHEFGAME - Editorial

PROBLEM LINK:PracticeContestAuthor:Roman RubanenkoTester:Hiroto SekidoEditorialist:Anton LunyovDIFFICULTY:MEDIUMPREREQUISITES:Prim's algorithmPROBLEM:The best described in the problem statement.QUICK...

View Article

Algorithm: Given an array, find all the pairs of elements whose sum is k.

algorithm for:-----Given an array, find all the pairs of elements whose sum is k.

View Article

guys. i m getting TLE in wstring . How to optimize it??

my solution

View Article

Yahoo Hackathon DP Problem

There is a sequence of N random integers, which can contain any integer between -10 and 10 (both of which are inclusive). The task is to find the number of continuous sequences of integers such that...

View Article


Andrew and the Meatballs again (practice -easy)

http://www.codechef.com/viewsolution/2287181 Here is my solution for the problem Andrew and the Meatballs again in practice session under easy ones. Can anybody help me regarding my solution..its...

View Article

CHEFGAME-Wrong Answer

Getting WA.But am not able to work out any corner cases.Can somebody give me some test cases.Help?Code

View Article


Practice problems related to trees

Hello Everyone, I am very new to programming and data structures, I am reading trees from "Introduction to Algorithm" by CLRS, I need help in practicing them, I don't know any site where I can get lot...

View Article

Is it necessary that a file created in text mode must always be opened in...

pls give appropriate explanation supporting your yes/no

View Article


time limit exceeded problem plz help

import java.util.Scanner; class cc { public static void main(String args[]){ long n,x,k; int c=0; Scanner input =new Scanner (System.in); n=input.nextLong(); k=input.nextLong(); while(n>0){...

View Article

TLE in June cook off 2013 Attic Problem-C++

Why does TLE show up?? Following code is in C++ 4.3.2include<cstdio>include<cstdlib>include<cmath>include<string.h>define TMAX 1000007define PMAX 1000007int main() { long long...

View Article

ATTIC - Editorial

Problem Link:PracticeContestDifficulty:CAKEWALKPre-requisites:ad-hocProblem:You are given a string of "#" and "." representing a passage. A "#" means the presence of a floorboard, while a "." is the...

View Article
Browsing all 39796 articles
Browse latest View live


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