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 ArticleBuy 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 ArticleTETRA : 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 Articlereversing 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 Articlevirtual 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 ArticleGetting '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 ArticleCHEFGAME - Editorial
PROBLEM LINK:PracticeContestAuthor:Roman RubanenkoTester:Hiroto SekidoEditorialist:Anton LunyovDIFFICULTY:MEDIUMPREREQUISITES:Prim's algorithmPROBLEM:The best described in the problem statement.QUICK...
View ArticleAlgorithm: 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 ArticleYahoo 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 ArticleAndrew 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 ArticleCHEFGAME-Wrong Answer
Getting WA.But am not able to work out any corner cases.Can somebody give me some test cases.Help?Code
View ArticlePractice 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 ArticleIs it necessary that a file created in text mode must always be opened in...
pls give appropriate explanation supporting your yes/no
View Articletime 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 ArticleTLE 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 ArticleATTIC - 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