What the heck. Codechef is down. 502 bad gateway.
At the start of cook off why do codechef generally go down?
View ArticleSorting In an array
How to sort Element in array For Example arr[] = {"Code1","Code10","Code2","Code20",code30}; output should be code1,code2,code10,code20,code30 but when i use arrays.sort in java it gives the output...
View ArticleHeader files included in bits/stdc++.h
I recently came across bits/stdc++.h . However, it turns out that it isn't there on OSX. Can someone please share the contents of the file with me, so that I can add this header file manually?
View ArticleCan anyone provide a hint to this ques?
http://codeforces.com/blog/entry/53815 problem 839D In this question we have to partition the array according to some condition?But I cannot understand the formula used.
View ArticleProblem regarding Binary Heap
How to find out the minimum number of swaps required to convert the given array into a max heap??
View Articlehttps://www.codechef.com/SEPT17/problems/SEACO
void exec(int x, int y,int j){ for(int i=x-1;i<y;i++)b[j][i]=(b[j][i]+1)%mod; } void exec2(int x, int y,int j,int n){ for(int i=x-1;i<y;i++){ for(int k=0;k<n;k++){...
View ArticleBUYING2 SWEET
I just started looking at the problem BUYING SWEET my hunch tells me that correct condition/logic to solve the above problem is this ...(sum % total_sweet) if find any note else then remainder then the...
View ArticleC language that will read the value of x
WAP in C language that will read the value of x and evaluate the following function 1 for x < 0 y = { 0 for x = 0−1 for x > 0 Using (a) nested if statements (b) using else if statements (c) using...
View ArticleHow to search a user on CodeChef?
How do I search an individuals profile on CodeChef. Is there any way to search for a specific username? I just want to view the profile of a username.
View ArticleWrong ansewer!!!
can any 1 explain me what is the problem with my code https://www.codechef.com/viewsolution/15219242 after submitting its showing wrong answer.plz help.!!
View Articlesmall factorial (Why wrong?)
include<stdio.h>long long int fact(int n); int main() { int n,i,k[i]; long int d[i]; scanf("%d",&n); for(i=0;i<n;i++) {="" if(1<="n<=100" &&="" 1<="k<=100)"...
View ArticleWrong Answer!!! (Dividing stamps)
why this code is giving wrong answer, while working perfectly in my compiler??? Please help.....link to my solution-https://www.codechef.com/viewsolution/15217171
View Articlewhy does this factorial program does not return the number of trailing zeroes...
http://www.codechef.com/viewsolution/1017061 when I give input as follows:5 5 10 15 20 25the output I get is:1 2 3 4 0 import java.util.Scanner; class Factorial { public static void main(String args[])...
View ArticleDoubt in Traverse problem of Innerve's summer code challenge.
Where this logic is giving wrong answer??? Traverse problem of innerve....while(t--){ scanf("%d",&m); if(m%3 == 0){ printf("%d %d\n",m/3,2*(m/3)); } else{ double n=m; i=ceil(n/3); j=i-1;...
View Articlemy approach is correct or not for chef and rods of TSEC codeathon?
Problem link-https://www.codechef.com/TSCO2017/problems/TSECJ106solution-import java.util.Arrays; import java.util.Scanner;/ * To change this license header, choose License Headers in Project...
View Articleplz tell whats wrong in my code
plz tell me whats wrong in my codequestion link-link textimport java.util.Scanner; class practice { public static void main(String[] arg) { Scanner kb=new Scanner(System.in); int test=kb.nextInt();...
View ArticleWhat are the possible errors in this code? It gives me SIGABRT.
//a program to perform the following operations on a linked list #include < stdio.h>include < stdlib.h>//node of the linked list typedef struct Node{ int data; struct node *link;...
View ArticleCodechef Rating Predictor
Hello everyone!Codechef Rating PredictorThe delay in previous month rating changes + inspiration from CF Predictor and for the practice of a web-application, i tried to write a script that can predict...
View ArticleMATTEG - Editorial
Problem LinkPracticeContestAuthor:Alexandru ValeanuTester:Hasan JaddouhEditorialist:Bhuvnesh JainDifficultyMEDIUMPrerequisitesRecursion, Bitmask Dynamic Programming, HashingProblemYou are given a grid,...
View Article