You are not logged in. Please login at www.codechef.com to post your questions!

×

What kind of comment should I post on the problem page?

24
3

Is there any comment posting guideline? I am new on this website. I have so many doubts while I participate in a contest. Can I ask them on the problem page by posting a comment? Will I be banned for asking something which is not relevant?

asked 25 May '12, 23:12

anup's gravatar image

2★anup ♦♦
2.4k273944
accept rate: 21%

i cannot match the explanation with the problem statement....how it is?

(08 Sep '14, 10:20) aniscseiu273★

Can I change the alphabets after deleting to make the given string as palidrome?

(07 Nov '14, 18:30) alttlprgrmmng3★

50

Comments are a mechanism for the users to interact with the problem setting panel, the admins and other users to get their queries answered. Hence, it is important that the users are responsible while posting a comment so that those who answer the comments have to go through only meaningful and less number of comments. The likelihood of getting a reply to your comment also gets increased in such a scenario.

We have observed that a huge number of comments are being posted during our contests which are not relevant and could be avoided. It makes the life of our problem setters very difficult as they have to scan through all such comments to reply to only the ones which are relevant.

Hence we have come up with a comment posting guidelines which we expect each one of us to adhere to.

During a live/running contest:

  • You cannot share your logic, answer, input, code, hint, algorithm, etc.

  • You cannot share the run-time or space complexity of your solution.

  • You cannot ask hints to solve the problem.

  • You cannot ask more test cases.

  • You cannot ask for help for finding bugs in your code.

  • Do not comment if it is absolutely not necessary to do so.

  • Read all the previously posted comments for a problem before posting your comment to avoid asking the same query twice.

  • Read our FAQ thoroughly before asking a question. If the FAQ does not have your question answered, only then post your query.

  • You can post questions regarding any clarification in the problem statement. However, please read the problem statements multiple times before posting your query. We take great care in trying to come up with unambiguous problem statements and most of the times it has been found the query asked is answered by a careful reading of the problem statement.

  • Your comment should be relevant to the page on which you are posting it.

  • Any question or query that is not relevant to the problem or the page that you are on, you should not post it as a comment there. All such questions should be asked in this forum.

The following rules must be adhered to for posting any comments across the website. Users not doing so may face permanent suspension from the website.

  • Posting of any filthy, inappropriate or abusive language is strictly prohibited.

  • Any advertisement or marketing content is not allowed.

  • Spamming the comments section will not be accepted under any circumstances.

link

answered 25 May '12, 23:19

admin's gravatar image

0★admin ♦♦
19.8k350498541
accept rate: 36%

edited 07 Feb '14, 15:03

6

And what about "Java is too slow for this problem (TLE), same algorithm in C/C++ works fine." hint? I think, it is similar to "Warning: large Input/Output data, be careful with certain languages" warning. Because there are such problems, in which time limit multiplication is not enough. And if someone is programming only in Java he/she has no chance to solve such problem, so this hint simply tells "skip this one".

(31 May '12, 20:03) betlista ♦♦3★
26

According to this rules, is there something that I can ask?

(01 Jun '12, 21:44) betlista ♦♦3★
2

@belista: Yes. Any dis-ambiguity in the problem statements. Anything that you cannot understand and which cannot be genuinely found elsewhere.

(06 Dec '12, 14:56) admin ♦♦0★
6

Yes, but when I want to describe the dis-ambiguity I prefer to show it using some example test case and that's agains "share hints" and "share input" rules...

(10 Apr '13, 16:14) betlista ♦♦3★

Can I ask whether certain input (not contained in the sample input) is valid for the problem?

(08 Jun '14, 19:35) natashal3★

How do I format a comment to include line breaks, for example? HTML is not allowed.

link

answered 11 May '13, 00:32

evandrix's gravatar image

3★evandrix
165148
accept rate: 0%

4

it's markdown syntax. You can add double spaces and a traditional line break(\n) at the end of a line and a <br> will be inserted.

(06 Apr '14, 11:57) svineet3★

Please notify if my comment/query is blocked from the contest page. At least I will not wait for the answer and post a more refined comment.

Or maybe the setter can post a comment with a modified form of query which is "acceptable", along with the answer.

link

answered 07 Jul '14, 11:20

yash_15's gravatar image

5★yash_15
5181716
accept rate: 2%

Queries regarding input-Output constraints or regarding unclear problem statements can be asked and are almost always answered by the admin.

link

answered 23 Jul '13, 13:41

re_hash's gravatar image

4★re_hash
8493815
accept rate: 3%

Answer is hidden as author is suspended. Click here to view.

answered 17 Apr '17, 13:37

newone123's gravatar image

0★newone123
(suspended)
accept rate: 16%

Please correct russian statements. On main page its written that objects indexes starts from 1, but russian statement claims that from 0.

link

answered 07 Jul '14, 12:41

simb4's gravatar image

4★simb4
1
accept rate: 0%

link

answered 03 Aug '14, 01:38

ayush1khundia's gravatar image

1★ayush1khundia
1
accept rate: 0%

Can we ask about the explanation of given test cases?

link

answered 05 Oct '14, 03:38

rishabhprsd7's gravatar image

2★rishabhprsd7
1.9k11243
accept rate: 14%

import java.util.Scanner; class Puzzle { static int n,a[]; static int sum=0,statue,count,count1=0; public static void main(String s[]) { try { for(int j=0;j<50;j++) { Scanner sc=new Scanner(System.in); n=sc.nextInt(); if(n==0) { break; } count=0; sum = 0; count1++; a=new int[n]; for(int i=0;i<n;i++) { a[i] = sc.nextInt(); sum = sum+a[i]; } statue = sum/n; for(int i=0; i<n;i++) { if(a[i]<=statue) { continue; } else { count=count + (a[i]-statue); } } System.out.println("Set #"+count1); System.out.println("The minimum number of moves is "+count+"."); } } catch(Exception e) { } } }

link

answered 29 Oct '14, 03:35

shreyansh_1913's gravatar image

2★shreyansh_1913
1
accept rate: 0%

sir i not understood this point can please explain it

At the beginning Chef has segment [0, X] and no points on it. On each step Chef chooses the subsegment of maximal length possible such as it contains no points on it.

link

answered 14 Nov '14, 13:23

arb93's gravatar image

2★arb93
1
accept rate: 0%

Is there something in specific that needs to be done to get my queries answered? I have posted queries adhering to the above mentioned guidelines and still never get a response, can you explain a reason why this could be the case. Thanks in advance...!

link

answered 03 Jan '15, 16:24

bluecode's gravatar image

1★bluecode
1
accept rate: 0%

include <stdio.h>

include <math.h>

int main() { int t; scanf("%d", &t);

while(t--) 
{
    int a=0,b=0,c=0;
    scanf("%d %d",&a,&b);
    c=pow(a,b);
    printf("%d\n",c);
}
return 0;
WHAT ERROE IN IT

}

link

answered 22 Jan '15, 12:13

dishatiwari's gravatar image

1★dishatiwari
1
accept rate: 0%

i don't get it

link

answered 27 Jan '15, 22:48

shubham9901's gravatar image

0★shubham9901
1
accept rate: 0%

include<stdio.h>

include<math.h>

int main() { int a[10]; int i,t,p; scanf("%d",&t); if(t<=0) { p=0; printf("%d\n",p); } else{ while(t>0) {
int min1,min2; p=0; for(i=0;i<=9;i++) { scanf("%d",(a+i)); } min1=a[1]; min2=1; for(i=1;i<=9;i++) { if(min1>a[i]) { min2=i; min1=a[i]; } } if(min1>a[0]) { p=min2; p=ppow(10,a[0]+1); } else { for(i=0;i<=min1;i++) p=p+min2pow(10,i); } printf("%d\n",p); t--; } } return 0; } check y this not true

link

answered 14 Feb '15, 11:58

grb47's gravatar image

4★grb47
1
accept rate: 0%

Please do not post a Question as an answer here. If you want to ask a question, go to Discuss -> Forums -> Ask a Question.

(14 Feb '15, 12:05) arun_as1★

I am new on this website. I have so many doubts while I participate in a contest. Can I ask them on the problem page by posting a comment? Will I be banned for asking something which is not relevant?

link

answered 28 Feb '15, 13:32

jyo_123's gravatar image

0★jyo_123
2
accept rate: 0%

I am new on this website. I have so many doubts while I participate in a contest. Can I ask them on the problem page by posting a comment? Will I be banned for asking something which is not relevant?

link

answered 28 Feb '15, 13:32

jyo_123's gravatar image

0★jyo_123
2
accept rate: 0%

Adobe Systems is hiring Software Engineers CTC:- 8-30 Lac, Exp:- 0-8 Years, Bangalore

Apply Here:- http://jobsiit.com/jobs/view/1876/Adobe-Systems/Software-Engineer

Check out the latest Coding jobs :- http://jobsiit.com/jobs/listing/Computer%20Science

link

answered 01 Mar '15, 14:05

jobsiit's gravatar image

0★jobsiit
173
accept rate: 0%

package com.bhawna.CodeChef.easy;

import java.util.Scanner;

public class LuckyLong {

public static void main(String args[])
{
    int number,mod,count=0;
    Scanner scan=new Scanner(System.in);
    System.out.println("Enter the number of test cases");
    int testCases=scan.nextInt();
    while(testCases>0)
    {
        count=0;
        System.out.println("Enter a number");
        number=(scan.nextInt());
        while(number>0)
        {
            mod=number%10;
            if((mod%7==0||mod%4==0))
            {

            }
            else
            {
                count++;
            }
            number=number/10;
        }
        System.out.println(count);
        testCases--;

    }
}

}

link

answered 02 Mar '15, 00:52

joshigurl's gravatar image

0★joshigurl
1
accept rate: 0%

include<stdio.h>

include<string.h>

main(); { int n; char c[2],k[2]; int i,t; //printf("enter the no of names"); scanf("%d",&n); for(t=0;t<n;t++) { scanf("%s",&c[t]); scanf("%s",&k[t]); } strcmp (c[t],k[t]); if (strcmp(c[t],k[t])==1) { printf("%s",k[t]); } for(t=0;t<n;t++) { i=atoi(c[t]); printf(" %d",i); } return 0; }

link

answered 06 Mar '15, 12:44

hariiiprasath's gravatar image

0★hariiiprasath
1
accept rate: 0%

I AM NOT GETTING UR QUES MATRIX IN MARCH CHALLENGE ,WHAT IS THE DIFFERENCE BETWEEN QUERY 5&7

link

answered 09 Mar '15, 16:23

nikkey's gravatar image

1★nikkey
1
accept rate: 0%

It says "Wrong Answer".Code is working on my desktop compiler. Here is the code.

Please help!

include<stdio.h>

int main() { int i=0,j=0,max1=0,max2=0; scanf("%d",&i); int n[i],o[i];

while(j<i)
{
scanf("%d %d",&n[j],&o[j]);
j++;
}
j=0;
while(j<i)
{
    if(max1<(n[j]-o[j]))
    max1=n[j]-o[j];
    if(max2<(o[j]-n[j]))
    max2=o[j]-n[j]; 
    j++;    
}
if(max1>max2)
printf("1 %d",max1);
else
printf("2 %d",max2);

return 0;
    }
link

answered 28 May '15, 19:19

abhikul's gravatar image

0★abhikul
1
accept rate: 0%

why i am getting wa on my problem

link

answered 07 Jun '15, 17:47

nikkey's gravatar image

1★nikkey
1
accept rate: 0%

As I have karma = 1, I cannot comment on the problems of June challenge (I can, but it says "you comment screened out till admin's approval", and I got no answers yet), neither I can create new threads in discussions :(

So, probably, someone will see my comment here and will comment on my behalf that I have strong suspicions that the problem CHPLGNS of June's Challenge has incorrect test data set #9. If you solve the problem honestly testing for each pair of the polygons, which one is contained inside another one, it will detect that in the data set #9 there is a pair of polygons not lying one inside another (my implementation of this approach correctly passes all other test cases, showing, by the way, that in the test cases ##4, 10 some of the polygons touch each other, though task's authors replied many times in the comments that it never happens). So, there is another, simpler approach to solve the problem, valid if it is guaranteed, as in the task condition, that for each pair of the polygons one of them contains another. And this approach passes the set #9, though, in no way it really checks that the test-set satisfies task conditions.

link

answered 10 Jun '15, 01:18

birdofprey's gravatar image

5★birdofprey
211
accept rate: 0%

s there something in specific that needs to be done to get my queries answered? I have posted queries adhering to the above mentioned guidelines and still never get a response, can you explain a reason why this could be the case. Thanks in advance...!

link

answered 01 Jul '15, 16:04

poonam_234's gravatar image

0★poonam_234
1
accept rate: 0%

Is it okay to comment something funny ? Like I was reading this problem on bread and I commented saying "I feel like eating Garlic Bread after Reading this problem statement :D Heheheh" and I guess the admin dint approve it. Why ? Is it so bad to post some humor ?

link

answered 04 Jul '15, 10:20

dollarakshay's gravatar image

4★dollarakshay
17617
accept rate: 4%

//Chef and way in JAVA import java.util.*; class Chefstreet1 { static Scanner sc=new Scanner(System.in); public static void main(String[] args) { int n=sc.nextInt();; int k=sc.nextInt(); int mat[]=new int[n];

    int a=1;
    for (int i=0;i<n ;i++ )
    {
        mat[i]=a;
        a++;
    }
    for (int i=0;i<n ;i++ )
    {
        System.out.print(mat[i]);
    }
    System.out.println();


    int g=0;
    for (int i=0;i<n-1 ;i++ )
    {
        for (int j=0;j<n-1 ;j++ )
        {
            if (mat[j]>mat[j+1])
            {
                g=mat[j];
                mat[j]=mat[j+1];
                mat[j+1]=g;
            }
        }
    }

    int q=0;
    int min=0;


    for (int i=1;i<n-1 ;i++ )
    {
        if(((mat[i]-mat[1])<=k)&&((mat[n-1]-mat[i])<=k))
        {
        q=mat[n-1]-mat[i];
        }

        q=mat[n-1]*mat[i];

        if ((q>min)&&(min==0))
        {
            min=q;
        }
        else if (q<min)
        {
            min=q;
        }

    }
    System.out.println(min);

}

}

link

answered 09 Dec '15, 11:04

ravibhatta647's gravatar image

0★ravibhatta647
1
accept rate: 0%

As I post a comment in a live competition as well as on an old question, the comment turn up red!?

link

answered 07 Jul '16, 16:13

parthendo's gravatar image

3★parthendo
1
accept rate: 0%

If these are the rules, what is the need to create a comment section ? Don't clarify the doubts. Don't ask questions. etc etc. How can we develop coding skills then without getting even proper assistance ?

link

answered 06 Nov '16, 00:28

sukurcf's gravatar image

2★sukurcf
1
accept rate: 0%

include<stdio.h>

int main() { float x[10000],y[10000]; int T,N,i,S1,S2; scanf("%d",&T); scanf("%d\n",&N); if (N%2!=0) {for(i=0;i<N;i++) { scanf("%f",&x[i]); S1+=x[i]; scanf("%f",&y[i]); S2+=y[i];

    }
}

if (N%2==0) { for(i=0;i<N/2;i++) { scanf("%f",&x[i]); S1+=x[i]; scanf("%f",&y[i]); S2+=y[i];

    }
    for(i=N/2;i<N;i++)
    {
        scanf("%f",&y[i]);
        S2+=y[i];
        scanf("%f",&x[i]);
        S1+=x[i];

    }

}

if (S1<S2)
    printf("%d",S1);
else
    printf("%d",S2);

}

Can you tell me what mistake i have made

link

answered 20 Mar '17, 00:23

karuo07's gravatar image

0★karuo07
1
accept rate: 0%

include<stdio.h>

int main() { int N,i,j,T,Tx=0,Ty=0;

scanf("%d",&T);
scanf("%d",&N);
int x[N],y[N];
for(i=0;i<N;i++)
    scanf("%d",&x[i]);for(i=0;i<N;i++)scanf("%d",&y[i]);
i=0;
for(i=0;i<N-1;i=i+2)
    Tx=Tx+x[i]+y[i+1];
if(i==N-1)
    Tx=Tx+x[i];
j=0;
for(j=0;j<N-1;j=j+2)
    Ty=Ty+y[j]+x[j+1];
if(j==N-1)
    Ty=Ty+y[j];
printf("%d",(Tx>Ty?Ty:Tx));
return 0;

} whats wrong with my code for begineers first problem?

link
This answer is marked "community wiki".

answered 22 Mar '17, 21:53

karuo07's gravatar image

0★karuo07
1
accept rate: 0%

I am here to practice and improve my coding skills. Here, the problem statement contains a simple testcase, whereas the problem can contain complex testcases. Without knowing what went wrong how can I be able to solve the problem. At least give us two testcases instead of One, like one is complex and the other is simple.

link

answered 17 Apr '17, 13:12

mpravi14's gravatar image

0★mpravi14
1
accept rate: 0%

include <bits stdc++.h="">

using namespace std;

int main() { long long t; cin >> t; long long num; while(t--) { cin>>num; if(num==0) { cout<<0<<" "<<0<<endl; } if(num==1) { cout<<1<<" "<<0<<endl; } if(num==2) { cout<<1<<" "<<1<<endl; }

    if(num>=3)
    {
        int s;
        s = num % 3;
        if(s==1)
        {
            int a;
            a = num/3;
            cout<<a+1<<" "<<a*2<<endl;
        }
        if((s==2) && (num%2==1))
        {
          int b;
          b = num/3;
          cout<<b*2<<" "<<b*2+1<<endl;   
        }
        if((s==2) && (num%2==0))
        {
          int b;
          b = num/3;
          cout<<b+1<<" "<<b*2+1<<endl;   
        }
        if(num%3==0)
        {
          int q;
          q = num/3;
          cout<<q<<" "<<q*2<<endl;
        }
    }
}


return 0;

}

link

answered 20 Jul '17, 02:17

jalonsatish's gravatar image

1★jalonsatish
1
accept rate: 0%

include <bits stdc++.h="">

using namespace std;

int main() { long long t; cin >> t; long long num; while(t--) { cin>>num; if(num==0) { cout<<0<<" "<<0<<endl; } if(num==1) { cout<<1<<" "<<0<<endl; } if(num==2) { cout<<1<<" "<<1<<endl; }

    if(num>=3)
    {
        int s;
        s = num % 3;
        if(s==1)
        {
            int a;
            a = num/3;
            cout<<a+1<<" "<<a*2<<endl;
        }
        if((s==2) && (num%2==1))
        {
          int b;
          b = num/3;
          cout<<b*2<<" "<<b*2+1<<endl;   
        }
        if((s==2) && (num%2==0))
        {
          int b;
          b = num/3;
          cout<<b+1<<" "<<b*2+1<<endl;   
        }
        if(num%3==0)
        {
          int q;
          q = num/3;
          cout<<q<<" "<<q*2<<endl;
        }
    }
}


return 0;

}

link

answered 20 Jul '17, 02:17

jalonsatish's gravatar image

1★jalonsatish
1
accept rate: 0%

I am able to run and execute my code in my desktop perfectly but in this interpreter i am getting wrong answer . What's the problem in that

link

answered 12 Aug '18, 12:42

nithesh_kg's gravatar image

0★nithesh_kg
1
accept rate: 0%

package code.com;

import java.util.Scanner;

public class LuckyLong { public static void main(String args[]){

    int number,mod,count=0;
    Scanner scan=new Scanner(System.in);
    System.out.println("Enter the number of test cases");
    int testCases=scan.nextInt();
    while(testCases>0)
    {
        count=0;
        System.out.println("Enter a number");
        number=(scan.nextInt());
        while(number>0)
        {
            mod=number%10;
            if((mod%7==0||mod%4==0))
            {

            }
            else
            {
                count++;
            }
            number=number/10;
        }
        System.out.println(count);
        testCases--;




    int number1,mod1,count1=0;
    Scanner scn=new Scanner(System.in);
    System.out.println("Enter the number of test cases");
    int testCases1=scn.nextInt();
    while(testCases1>0)
    {
        count1=0;
        System.out.println("Enter a number");
        number1=(scan.nextInt());
        while(number1>0)
        {
            mod1=number1%10;
            if((mod1%7==0||mod1%4==0))
            {

            }
            else
            {
                count1++;
            }
            number1=number1/10;
        }
        System.out.println(count1);
        testCases1--;

    }
}
}

}

link

answered 28 Aug '18, 14:06

shiwani_95's gravatar image

0★shiwani_95
1
accept rate: 0%

-2

include<stdio.h>

int function(int n) { if(n>1) return (function(n-1)+factor(n-1)); if(n==1) return 0; }

int factor(int n) { int p=1,i,power=0; for(i=2;ii<=n;i++) { power=0; while(n%i==0) { n=n/i; ++power; } p=p(power+1); } if(n>1) { p=p*2; } return p; }

int main() { int t,n,i,a=0; scanf("%d",&t); while(t--) { scanf("%d",&n); for(i=1;i<n;i++) a=a+function(i*(n-i)); printf("%d\n",a); a=0; }

return 0; }

link

answered 14 Apr '14, 00:32

gauravjaingc's gravatar image

4★gauravjaingc
13
accept rate: 0%

-3

why wrong answer is giving even if i am getting expected outputs on every test cases

link

answered 22 Jul '13, 19:17

luckysdream29's gravatar image

1★luckysdream29
26
accept rate: 0%

This thread is wrong place to ask such question, ask it on your problem tutorial page, please.

(22 Jul '13, 19:23) betlista ♦♦3★
-5

whr wrong answer?

link

answered 02 Dec '12, 03:05

al_helal's gravatar image

3★al_helal
37
accept rate: 0%

3

Please post questions on a relevant thread. Do not post code here. Give a link to your submission.

(02 Dec '12, 03:44) admin ♦♦0★
(06 Dec '12, 13:11) myway2★
(18 Mar '14, 22:38) betlista ♦♦3★
toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×2,738
×214
×36

question asked: 25 May '12, 23:12

question was seen: 104,427 times

last updated: 17 Oct '18, 02:21