Invitation to NCC 2015
PICT IEEE Student Branch presents National Computing Contest 2015, with CodeChef as Programming Partner.Contest will last for 2 hours. It will start on 28th March 2015 at 2100 hours IST.This is a team...
View ArticleJULKA SPOJ PROBLEM
when i submit the code on spoj it gives wrong answer but on code blocks it is showing right output .can anyone can sort out the problem . my code is :- / natalia = (total-more)/2 klaudia=...
View ArticleLife, the Universe, and Everything: Runtime Error(NZEC)
I'm trying to submit code for the problem "Life, the Universe, and Everything" under the Section "Practice(easy)". But I'm getting this error messageRuntime Error(NZEC)But in code Blocks the below is...
View Articleenormous input test
include<stdio.h>int main() { int n,k,count=0,t,i; scanf("%d %d",&n,&k);for(i=0;i<n;i++) while(n="">0) { scanf("\n%d",&t); if(t%k==0) count++; } printf("%d",count);; return 0;...
View ArticleTHE LAST DIGIT
i have made a way to assign the last number but on uploading it on spoj it says wrong answer . can anyone can help to sort out this problem. my code is:include<iostream>include<cmath>using...
View ArticleGrtting TLE For EQUATION
include <stdio.h>include <iostream>int main() {int t; scanf("%d",&t);while(t--) { long long int N,A,B,C,i,j; scanf("%lld %lld %lld %lld",&N,&A,&B,&C); long long int...
View ArticleContinents in Sea - Editorial
Problem Link :http://www.codechef.com/CDCK2015/problems/COUNTC Author :Ankur Goel Tester : Ankur Goel Editorialist : Shuchita Garg Problem :A sea contains a number of continents. From a sea, we have...
View ArticleCOINX - Editorial
Problem Link :http://www.codechef.com/CDCK2015/problems/COINXAuthor: Ankur Goel Tester: Ankur Goel Editorialist Shuchita GargDIFFICULTY:EasyPREREQUISITES:Fibonacci numbersPROBLEM:Ankur has two boxes...
View ArticlePrimorial - Editorial
Problem Linkhttp://www.codechef.com/CDCK2015/problems/PRMRLAuthor: Ankur Goel Tester: Ankur Goel Editorialist Shuchita Garg DIFFICULTY: Easy PREREQUISITES: Factorial of a number PROBLEM:The Primorial...
View ArticleCENCODE - Editorial
Problem Linkhttp://www.codechef.com/CDCK2015/problems/CENCODEAuthor: Pravakar Wang Tester: Ankur Goel Editorialist: Shuchita Garg Difficulty: Easy Prerequisite LCM ( Least comman multiple) Problem :A...
View ArticleTASTYD - Editorial
Author: Roman Rubanenko Tester: Vamsi Kavala Editorialist: Bruno OliveiraPROBLEM LINKSPracticeContestDIFFICULTYMediumPRE-REQUISITESDivide-and-conquerProblem:Chef is at a restaurant serving dishes....
View ArticleNumber of connected components while removing an articulation point
I want to calculate number of connected components an articulation/cut vertex generates while removing it. I am calculating it as number of children +1 in dfs tree of the graph( for root, number of...
View Articlehelp in quicksort
http://ideone.com/QOJxKj please tell me what changes i should do in this quicksort program
View ArticleSTRAB - Editorial
PROBLEM LINK:PracticeContestAuthor: Vitaliy Herasymiv Tester: Istvan Nagy Editorialist: Amit PandeyDIFFICULTY:Easy-Medium.PREREQUISITES:Counting, Dynamic Programming, Recursion.PROBLEM:Given strings...
View ArticleAlgorithms
If f(n) is O(g(n)) and f(n) is O(h(n)), then which of the following statements MUST be true: A. f(n) + g(n) is O(h(n)) B. g(n) + h(n) is O(f(n)) C. f(n) is O(g(n) + h(n)) D. None of the above
View ArticleSimple Program.
Guys this is a simple question which asks to print all the perfect squares which only has 0,1,4,9 as their digits.I made a program but it is not Working.Pls Help!!#include <stdio.h> #include...
View ArticleNumber of integral coordinates leing between two integral coordinates
Please help me find out solution of the problem on HackerRank Flash and the Lines. How could gcd(abs(x1 -x2 ),abs(y1 - y2)) - 1 be the answer.
View ArticleGAMES problem on spoj
Hi, I's going through the following problem of spoj http://www.spoj.com/problems/GAMES/ but when I submit the code, it showa Wrong Answer and I think there is no mistake in my code.include <bits...
View ArticleRegarding HORRIBLE-SPOJ
Implemented Segment tree for finding query and updation. Getting TLE.How can I optimize to get AC?HORRIBLE-SPOJMy Code:
View Article