FORGETPW - Editorial

I am getting Runtime error for my java code.
Can anybody help me with this?

http://www.codechef.com/viewsolution/4044062

http://www.codechef.com/viewsolution/4110336
Can you please tell me for what case does this solution fail because it passes all the tricky cases mentioned here.
Thanks in advance.

we can also used linked list for removing 0

Hi,

My solution is http://www.codechef.com/viewsolution/4079595.My solution passed all the testcases successfully. Can you please help me to find the error with my solution.

hi…I usually code in java…and I referred to the Editorialist’s solution for this problem. With all due respect, I think there is one case where the output’s not valid…

Input:

1

1

z .

343z.89

Output:
343…89

Well, is it or is it not a valid output ?

P.S. : No disrespect to anyone considering I’m just a newbie.

http://www.codechef.com/viewsolution/4046876

hey, guyz … i am new here … my solution is giving right answer for every test case but still WA . plzz can any one tell me my mistake or test case which i am missing … . please help me friends .

1 Like

Why does this get tle?

FORGETPW my solution

Is there any way to find out which test case a solution failed on? This was a pretty straight forward implementation but it got WA. http://www.codechef.com/viewsolution/4081801

Please help.Tried every possible case mentioned here.Still getting WA.

http://www.codechef.com/viewsolution/4114405

1 Like

All the sample test cases are passing. Also the corner case of ā€œ.ā€. However it is still giving wrong answer. Could somebody help?
http://www.codechef.com/viewsolution/4108137

1 Like

this is my solution. can anybody tell me what’s wrong with this solution. it passed all tricky test cases but still showing wrong answer.
http://www.codechef.com/viewsolution/4119925

My code works fine for all the input cases, I also tried my code with the tricky cases mentioned in the editorial but i am still getting WA. Can anyone please explain to me what the problem is.


[1]


  [1]: http://www.codechef.com/viewsolution/4120495

I’m getting a correct answer for every corner case, for every cases I read in the comments, yet getting a WA.


[1]
Can someone help me to tell where is it that I am going wrong?


  [1]: http://www.codechef.com/viewsolution/4123826

getting WA after trying several test cases… CodeChef: Practical coding for everyone …can someone help…!!

I am getting all test cases correct on my system still it is giving wrong answer …please suggest what i am doing wrong…
CodeChef: Practical coding for everyone

I’m just doing these for practice, but its really hard to call ā€œ.ā€ a ā€œpositive decimal numberā€. Arguably its also hard to call ā€œ0ā€ and ā€œ0.0ā€ as a ā€œpositive decimal numberā€ (ā€œnon-negative decimal numberā€ would have been more appropriate), but I don’t think that ā€œ.ā€ passes as a ā€œpositive decimal numberā€ in any culture I’m aware of.

plz can anyone point out the error… 5l8Jy2 - Online C Compiler & Debugging Tool - Ideone.com
i spent lot of time over it…(>_<)

@m1sterzer0 after reading your answer above…out of curiosity i checked your submission for the problem… i dont know why its giving the wrong output instead of being accepted as right answer z1YyRR - Online C++ Compiler & Debugging Tool - Ideone.com

http://www.codechef.com/viewsolution/3999376
This is my solution it is passing every case mentioned in the problem and every corner case as well. What is the problem here?

I am getting wrong answer error… please help…

#include < iostream>
#include < string>

using namespace std;

int main()
{

int n;
cin>>n;
string  enPass,Pass;
while(n>0)
{
    int r,counter=0;
    cin>>r;   //  no. of rules.
    char c[r],p[r];
    for(int i=0;i<r;i++)
    {
        cin>>c[i]>>p[i];  // taking each rule as input
    }
    cin>>enPass;  // taking encrypted password as input
    Pass = enPass;
    for(int j=0;j<enPass.size();j++)
    {
        for(int s=0;s<r;s++)
        {
            if(c[s] == enPass[j])
            {
                Pass[j] = p[s];
            }
            
        }
    }    
    
    int str_Size = Pass.size();
    for(int q = str_Size-1; q >= 0; q--)
    {
        if(Pass[q] == '0') Pass.erase(q);
        else if(Pass[q] == '.')
        {
            Pass.erase(q);
            break;
        }
        else break;
    }

   for(int t=0;t<str_Size;t++)
    {
        if(Pass[t] == '0') counter++;
        else break;
    }
   Pass.erase(0,counter);
    cout<<Pass<<"\n";
    n--;
}
return 0;

}