"I want to ask a question" - Ask them all here!

Is it legal to ask questions related to codeforces problem set (practice) on codechef?
As both are coders platforms! Initially i started coding for the first time at codechef but was scared so someone suggested me solving on codeforces and i feel more comfortable there because you can see your failing test cases there.

I have a Question. If you are topmost coder of Codechef but you have 0 karmapoint then can you ask question or Not ? Is it fair to decide only according to karmapoints and not your rank and rating?

First off thanks for doing this, because I have questions. How do I get better at understanding the problems? I am doing beginner and just read the problem and want to claw my eyes out because I have no clue what they are asking. Is there a trick to getting better at it?

Are Duplicate Elements Allowed In a Binary Search tree???

When will November cook-off ratings be updated?

Can anyone tell me why my solution for problem LRQUER from november lunchtime is giving wrong answer on subtask #2 but correct answer on subtasks #1 and #3. CodeChef: Practical coding for everyone

How to calculate revenue in business ? Please explain it through example.

plzz upvote me i want to ask questions!!

if possible please clear my doubt : help in understanding strongly connected component in graphs - general - CodeChef Discuss

When I run this Prime generator it works fine , but when i give range for prime’s as 1 to 10000000 it stops working and everything crashes !

I recently learned Sieve of Eratosthenes and is implementation of it.

Please help. I find this Karma system bad for newbies like me and would appreciate any help. Thanks in advance.

:smiley:

#include <iostream>
#include<stdio.h>
#include<bits/stdc++.h>
#define ll long long int

using namespace std;

int main()
{   ios::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    scanf("%d",&t);
   while(t--)
    {
        long long int m,n;
        scanf("%lld %lld",&m,&n);
        //Sieve
        bool prime[n+1];
        prime[0]=false;
        prime[1]=false;
        for(ll i=2;i<=n;i++)
            prime[i] = true;

        for(ll i=2; i*i<= n;i++)
        {
            if(prime[i])
            {
                for(ll j=i*2;j<=n;j+=i)
                    prime[j]=false;
            }

        }
        // Printing
        for(ll z=m;z<=n;z++)
        {
            if(prime[z])
                printf("%lld\n",z);
        }

    }

    return 0;
}

Why are solutions of ZCO practice contest of other coders are visible??

Is it because it’s a practice contest??

can someone explain with an example the use of upper_bound() and lower_bound() functions(as used in solving binary search problems)??

Hey, @vijju123,@admin

While using Codechef IDE, I noticed a bug. If a line is selected and Ctrl + / is pressed then, in general for other languages (I checked for C, C++ 6.3, C++ 17, PYTH, PYTH 3.5) the lines get commented out. But for PYPY, just a // is put before the lines, which is definitely not commenting out in case of PYPY.

Can you please check this and inform @admin if it is truly a bug (in case she does not notice).

Thanks.

What is error in my code?

https://www.codechef.com/viewsolution/14588443

Can Anyone Provide links and resources to study all about trees, related algorithms and it’s corollaries, from a beginner level?

please someone explain how to solve his?

help me… it working on all the tests i tried but i always get WA! where am i wrong?
https://www.codechef.com/viewsolution/16606169

how can I enter two,three values in a single line in python.
For eg. if I want to enter value of x,y in such a way
INPUT:
2 3
I want to input 2 3 in x and y ina single line .
How can I do this ?
will map function help me ?

Codechef Newbie here,

Below is my code for the recent Cookoff 89. Problem Football Match. It passes the example case, but then gives Wrong Answer after I submit. What is the error in my code?


n = int(input())
team1 = ""
team1count = 0
team2 = ""
team2count = 0
scoreArr = []
 
for x in range(n):
    testcaseNumber = int(input())
    for y in range(testcaseNumber):
        scoreArr.append(input())
    for z in scoreArr:
        if team1 != "" and team2 != "":
            continue
        elif team1 == "":
            team1 = z
            team1count = scoreArr.count(z)
        elif team2 == "":
            team2 = z
            team2count = scoreArr.count(z)
    if team1count == team2count:
        print("Draw")
    elif team1count > team2count:
        print(team1)
    else:
        print(team2)
    team1 = ""
    team2 = ""
    team1count = 0
    team2count = 0
    scoreArr = []
   

Thanks so much!

Where can I ask competitive programming questions?

Sometimes I am not able to understand problems or editorials or want to know some other way to solve the problem.Stack overflow community downvotes these type of questions.So is there any other site where I can post my queries and get answers in reasonable time?