getting wrong answer
#include<stdio.h> int main(){ int n,c,t,k,a[100]; long unsigned int candy; for(scanf("%d",&t);t>0;t--){ scanf("%d%d",&n,&candy); for(k=0,c=0;k<n;k++) {scanf("%d",&a[k]);...
View Articleplease help me in finding out runtime error (Nzec) in my c code its properly...
include<stdio.h>void main() { int a,b[2000],i,j,k,l=0; //printf("enter no"); scanf("%d",&a); if(a){ //printf("enter nos"); for(i=0;i<a;i++) scanf("%d",&b[i]); for(i=0;i<a;i++) {...
View ArticleUse of C++ code template
Why most people save a C++ code template where they include almost all the header file, no matter what the problem is, there code always have the same code, typical example in C++ 4.3.2#include...
View Articlelarge data in C++
I am not an awesome coder and not really an algo guy.But love coding small stuff....I have been trying out hands on competitive coding and been facing problems with handling large data. My codes solve...
View ArticleSIGSEGV ERROR
my code show this error SIGSEGVCode Deletedit is a simple code and where array out of index occur i don't know..
View ArticleWhy I am getting wrong answer in guessing game?
I have applied my logic, and got all correct answers on my PC, also my program is working fine with M,N<10^9, and yeah i am not using any nested loops. Please help me. I have got wrong answer about...
View Articlewhat is the nzec error in this code..?
Please tell me the nzec code in this code because i have java on my pc n dis code is running perfectly wid d correct answer there but showing a runtime nzec error in codechef...so plz guide me to...
View ArticleWhy am I getting NZEC?
Please help me, why am I getting NZEC in this submission. http://www.codechef.com/viewsolution/4044436
View Articlegetting wrong answer in maxcomp
pls temme y i am getting wrong answer for http://www.codechef.com/problems/MAXCOMP .My solution is http://www.codechef.com/viewsolution/4044666my logic is correct..i am expecting a tle..but it s...
View ArticleWA in DECSTR
#include<iostream> #include<vector> using namespace std; int main(){ std::ios_base::sync_with_stdio(false); vector <long int> v; int t1,x,t; cin>>t1; for(int i=0;i<t1;i++) {...
View ArticleGetting NZEC Error while solving Chef and Functions in python.
I tried executing on ideone and it executes succesfully for very large values. Then I checked all submissions made in python, and saw most of them got the NZEC error too. Anyone who tried solving in...
View ArticleHow to estimate if an algorithm performs within the time limits ?
Sometimes, I think so much to come up with an algorithm, then code it well only to find out that it gives a TLE. How can we estimate whether an algorithm with so-and-so complexity fits well with the...
View ArticleWA in Carvans
Here's the link http://www.codechef.com/problems/CARVANSinclude<stdio.h>int main() { int t, c[100], n, d, ctr, i, j; scanf("%d", &t); while (t--) { ctr = 1; scanf("%d", &n); for (i = 0; i...
View ArticleAMSGAME1 - Editorial
Problem Link:PracticeContestDifficulty:CAKEWALKPre-requisites:gcdProblem:You are given a set of N positive numbers A[0], A[1], ..., A[N-1]. At each step you pick two unequal numbers and replace the...
View ArticleMODULO with 10^9+7
Is (a - b) mod m same as ((a mod m) - (b mod m)) mod m?I'm having hard time dealing with it.Also if (a mod m) < (b mod m) then answer should be ((a mod m) - (b mod m) + m) mod m? I tried using...
View ArticleWhy doesn't code chef provides traceback ?
I just wanted to ask, why doesn't CodeChef gives us a traceback. It could be so helpfull in case of run time errors especially NZEC s. This is so annoying sometimes. As one spends hours planing a...
View ArticleSudoku Solver - C++
Hey guys, I made this Sudoku Solver and....... its not working. When I enter a proper Sudoku, It displays 9, and then all the other boxes are blanks.#include <iostream> using namespace std; int...
View Articlejust reevaluate chef and digit jump
check for following test cases1: 09988877766655544433222233008855772: 99888777766644668877665553334445556977775558875554for the above test cases rejudge all the accepted solution Actual answer for...
View ArticleGeneral Info about the contest
When will the solution of the ongoing contest will be put up?
View Article