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

I am getting run-time error. I tried too much to find where i am getting this but failed.
please help me. this is my code–>
this is Octomber lunchyime problem 2 MAXNUM3
https://www.codechef.com/viewsolution/15994545
thank you

Can someone explain what WA means for executing the codes for the contest. I won’t ask for help with the code. I just want to know how the competition works and how does the code execution take place for checking my answer submission. Thanks.

can anyone tell me error in my code?
question: LCH15JAB Problem - CodeChef
my code : CodeChef: Practical coding for everyone

Please upvote this comment. I want to get reputation points.

1 Like

Would it be possible for the author of CHEFNIL (or somebody else) to share the piece of code that is used to calculate the score of a solution?

I’m asking for this because I wrote a program which generates two possible solutions, computes the sum of points for both, and outputs the one with a larger sum. When I change the program to output just the first of those solutions (and ignore the second), the score of my submission goes up, and I can’t make sense of why this is happening.

I am new to codechef and i don’t know how to add constraints mostly given as sub-task2 in codechef problems i tried using the conditional statements but it is still showing sub-task-2 failed
some of my submission are:

problem link :CodeChef: Practical coding for everyone

solution :CodeChef: Practical coding for everyone

please find error in my code:
problem :CHEFSQ Problem - CodeChef
my code: CodeChef: Practical coding for everyone

When will be the Final RankList of ACM ICPC 2018 Online Round made Public? I am not even able to go to Contest Page, i.e. codechef.com/ACMIND17

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)??