Contest Performance

Sort by

recency

|

4 Discussions

|

  • + 0 comments

    Try this int main(){ int arr[100]; for(int j=1;j<6;j++) {cin>>arr[j];} int count=0; for(int i=1;i<6;i++)
    {if(arr[i]==i) { count+=100 ;

        }
    else if(arr[i]!=i&&arr[i]<=10+i)
        {
          count+=100-(arr[i]-i)*10;    
        }
    }
    cout<<count;
    return 0;
    

    }

  • + 0 comments

    my code is working just fine..yet showing wrong answer for a few test cases :/ https://www.hackerrank.com/contests/hourrank-3/challenges/contest-performance/submissions/code/4755580

  • + 0 comments

    i am getting a vague error //it says solution.cc:16:32: warning: iteration 4u invokes undefined behavior [-Waggressive-loop-optimizations] for (int j=i+1;j ^

  • + 1 comment

    something is wrong with indentation...

No more comments