Quantcast
Channel: CodeChef Discuss - latest questions
Browsing all 39796 articles
Browse latest View live
↧

ANDSQR - Editorial

PROBLEM LINK:Div1Div2PracticeSetter-ShavelVTester-Teja Vardhan ReddyEditorialist-Abhishek PandeyDIFFICULTY:MEDIUM PRE-REQUISITES:Fenwick Tree supporting range updates and range query, or segment tree...

View Article


FCTRL2 Why is it showing wrong answer

The code is running properly on my ide, why is it showing wrong answer on submission?include<stdio.h>int main() { int i,t,a[t],fact; scanf("%d",&t); for(int i=0;i<t;i++) {=""...

View Article


XORIER - Editorial

PROBLEM LINK:Div1Div2PracticeSetter-Priyanshi GuptaTester-Teja Vardhan ReddyEditorialist-Abhishek PandeyDIFFICULTY:EASYPRE-REQUISITES:Goldbach's Conjecture , Frequency array concept, Properties of...

View Article

Maximize K Product - wrong solution?

There is no editorial for this problem, but exists few same solution, for instance: https://www.codechef.com/viewsolution/20215651This greedy solutions as I see for test: 5 2 3 10 8 4 3 3will give...

View Article

What I am doing wrong?

I am trying to solve a Dynamic Programming problem. I made the recursive function which is working correctly but when I am using memoization then I am getting wrong answer. Please tell me what I am...

View Article


If you are in College, Watch this!

Hi,This post is for all the students who are out there and have just entered their colleges/universities after high school. No one shares what exactly it takes to be successful at the end of your...

View Article

BSHUFFLE - Editorial

PROBLEM LINK:Div1Div2PracticeSetter-Bogdan CiobanuTester-Teja Vardhan ReddyEditorialist-Abhishek PandeyDIFFICULTY:EASYPRE-REQUISITES:Observation, Simulation, Probability, Implementation and Data...

View Article

Facing weird problem lately when tried to access Codechef

Hello Codechef Community,I'm facing this weird problem whenever I try to access anything on Codechef. It says "Hold right there Sparky!! We have encountered a lot of unexpected requests on CodeChef...

View Article


why isnt the sysytem accepting my solution for flow 001

include<iostream>using namespace std; int main() { int t,a,b,ans; int output[100]; cin>>t; if(t>=1&&t<=1000) { for(int i=1;i<=t;i++) {...

View Article


DP tutorials for absolute beginners(youtube)

This is a video tutorial series for absolute beginners in Dynamic programming.Every weak a video will be updated with proper explanation.Till now the videos are :Sums in triangle(codechef)Iron man vs...

View Article

My submission is getting not getting accepted when it is correct?

include<stdio.h>int main() { int g,t,i,q; unsigned int n; scanf("%d",&t); while(t--) { scanf("%d",&g); while(g--) { scanf("%d %u %d",&i,&n,&q); if(n%2==0) { printf("%u",n/2);...

View Article

What's wrong with the judge?

I was solving a problem 'FCRTL' and I got wrong answer for the following input, can anyone explain why?#include <stdio.h> int main(){ long long int t; scanf("%lld",&t); long long int arr[t];...

View Article

How to register for two Regional Sites for same team on icpc.baylor.edu

My faculty registered a team for Kolkata-Kanpur site, Now We want to register same team for another site ( Amritapuri ), But we couldn't find any option to do so. There is an option to add team though,...

View Article


ZCO15001 - Editorial

PROBLEM LINKZCO15001DIFFICULTYEasyPREREQUISITESDynamic ProgrammingPROBLEM IN SHORTOutput the smallest n such that the given array can be broken into n contiguous sub-arrays which are...

View Article

Suggestions??

Can someone tell me as to where can we post our suggestions regarding the site?

View Article


Next Palindrome problem - PALIN

Please help me optimize this code. Also please suggest me tips for competitive coding in python 3.def nextPal(n): n = str(int(n)) if (n=='9'): return 11 if(n=='99'): return 101 l = len(n) if(l<2):...

View Article

How to find sum of sizes of all cycles in a small graph ?

Given a connected undirected graph with 1 <= n <= 100 nodes and n-1 <= m <= 100 edges, you need to tell the sum of sizes of all cycles in it. The best I could think of was bitmasks, but it...

View Article


XORIER - Editorial

PROBLEM LINK:Div1Div2PracticeSetter-Priyanshi GuptaTester-Teja Vardhan ReddyEditorialist-Abhishek PandeyDIFFICULTY:EASYPRE-REQUISITES:Goldbach's Conjecture , Frequency array concept, Properties of...

View Article

Maximize K Product - wrong solution?

There is no editorial for this problem, but exists few same solution, for instance: https://www.codechef.com/viewsolution/20215651This greedy solutions as I see for test: 5 2 3 10 8 4 3 3will give...

View Article

What I am doing wrong?

I am trying to solve a Dynamic Programming problem. I made the recursive function which is working correctly but when I am using memoization then I am getting wrong answer. Please tell me what I am...

View Article
Browsing all 39796 articles
Browse latest View live