ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2049. Chemistry

admin ,I think special judge of this problem is incorrect
Posted by Shen Yang 27 Nov 2017 06:37
this is my checker of this problem, it can't be wrong ,but WA on test 8

    if(i>=n||a[i]!=k)
    {
        while(!(n==5&&k==5))
           puts("orz");
       puts("-1");
        }
    else
    {
        printf("%d\n",cnt_ans);
        while(cnt_ans>3*n)
           puts("orz");
        for(i=0;i<cnt_ans;i++)
           printf("%d %d\n",ax[i],ay[i]);
        for(i=0;i<n;i++)
            a[i]=1;
        for(i=0;i<cnt_ans;i++)
        {
            int id1=ax[i]-1,id2=ay[i]-1;
            while(id1>=n||id1<0||id2>=n||id2<0||id1==id2)
               puts("orz");
            a[id1]-=a[id2];
            a[id2]*=2;
            while(a[id1]<0)
               puts("orz");
        }
        for(i=0;i<n;i++)
        {
            if(a[i]==k)
               break;
        }
        while(i!=0)
           puts("orz");
    }
Re: admin ,I think special judge of this problem is incorrect
Posted by Shen Yang 27 Nov 2017 06:37
it doesn't give ole but WA on test 8
Re: admin ,I think special judge of this problem is incorrect
Posted by Shen Yang 27 Nov 2017 07:00
sorry it's my mistake there is another no solution judge beforce this code...