why is this code giving runtime error
#include <iostream> using namespace std; int main() { int t,i,k,l; int z[100000]; cin>>t; for (i=0;i<=t-1;i++) {cin>>z[i]; } int temp; for (l=0;l<=t-2;l++) { for...
View ArticleCHEFSUBA help!
Hello. I am new to codechef, and I am not able to solve the question CHEFSUBA. I followed the editorial, learned about segment trees, and implemented the solution. I am getting wrong answer. Can anyone...
View ArticleUnordered Map
I implemented unordered map using this code : #include <unordered_map > #include <iostream > using namespace std; int main() { unordered_map<string,int> unmap; unmap["index"] = 11;...
View ArticleMARBLEGF help!
The problem can be solved using brute force and BIT as well. I tried to solve it using segment tree with point updates, but getting WA. Can anyone help or maybe give a test case where it fails? Here's...
View Articlestring.h defined but showing compilation error then strrev is called.
string.h defined but showing compilation error then strrev is called.in this simple program, it shows compilation error.but why?#include<stdio.h> #include<string.h> int main(void) { char...
View ArticleLOCJUN17:HHMGN, NZEC Can someone tell why? Code below
/ package codechef; // don't place package name! /import java.util.; import java.lang.; import java.io.*;/ Name of the class has to be "Main" only if the class is public. / class Codechef { public...
View ArticleMAXSEGM - Editorial
PROBLEM LINK:PracticeContestAuthor:Ramazan RakhmatullinTesters:Lewin Gan, Marek SommerEditorialist:Pawel KacprzakDIFFICULTY:EasyPREREQUISITES:Two pointersPROBLEM:You are given 2 arrays $W = [W_1, W_2,...
View Articleupload EDITORIALS !!
@admin pls upload the editorials of JUNE LONG challenge as well as COOK-OFF !!
View ArticleHow to find NZEC error ??
Hi! please tell me what is NZEC error, how to find it inside the code and how to prevent it ? How do codechef encounter NZEC errors, do they use any software ??
View ArticleRemove this feature Admin !!
@admin , Its been 17 hours since I asked a question here in Codechef and all I could get was 27 views THANKS TO YOUR NEW FEATURE OF SHOWING ONLY POPULAR QUESTIONS ..!!! This is absolute nonsense. Due...
View ArticleNEW to python NZEC error
import math t=input() for i in range(1,t+1): a=input() b=input() n=input() m=(n+1)/2 z=math.pow(2,m) a=a*z z=math.pow(2,n-m) b=b*z if a>b: print(int(a/b)) else: print(int(b/a))
View ArticleI think this user has two accounts
I think that this user has two accounts on Codechef. The usernames are:1) peehs-moorhsum2) moorhsumIt also appears twice in LOCJUN17 Ranklist. Could the @admin please check?
View ArticleHas anyone here attempted USACO training pages?
Hi all, I just started competitive programming and I have made a little progress in it.. I heard some people talk about USACO training pages on codeforces and therefore I went to check the pages out.....
View ArticleALGORITHMIST2 AND PHEONIX123 SHOWING WA
Problem Link :https://www.codechef.com/problems/BAADSHAHmy solution:https://www.codechef.com/viewsolution/14402995
View ArticleA variant of subset sum problem
I was trying to solve this problem on some other site, but couldnt find an optimal algo which meets its constraints. Here it goes - There exists an array A consisting of N numbers. Output the number of...
View ArticleLoC June 2017 PRATABHI Help
Can someone explain how to solve this problem .problem link https://www.codechef.com/LOCJUN17/problems/PRATABHI
View ArticleLogic for RIDDLE99 LoC JUN17
I could get the first 2 test cases correctly but got WA (not TLE) for 3 and 4. Tried to think a lot but couldn't understand what is wrong here. Any help is appreciated. Thanks! Here is the logic I used...
View ArticlePRECIOUS STONES EDITORIAL(UNOFFICIAL)
PRECIOUS STONES UNOFFICIAL EDITORIALCode:KOL16FLink: https://www.codechef.com/problems/KOL16FProblem Statement: You need to attend q queries. In each query you will be given a string consisting of only...
View ArticleUnordered Map
I implemented unordered map using this code : #include <unordered_map > #include <iostream > using namespace std; int main() { unordered_map<string,int> unmap; unmap["index"] = 11;...
View Article