New Year Party

Sort by

recency

|

4 Discussions

|

  • + 1 comment

    Test case #12

    9

    1 5 5 6 6 7 7 8 8

    Correct answer:12. and my answer is 12.

    Why am I getting "wrong answer" status?

    read n; read n; prev=0; curr=0; for i in curr; curr=prev -ge Misplaced &(( curr;

  • + 0 comments

    This code is working for all test cases...if any1 hav any otr idea plz share...thanks.

    public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int t[] = new int[n]; for(int i=0; i < n; i++){ t[i] = in.nextInt(); } int sum=t[0];
    for(int j=1;j=t[j]) sum=sum+1; else sum=t[j]; } System.out.println(sum); }

  • + 0 comments

    If I submit the code now will the score be added to my algorithm section score or anywhere else?

  • + 1 comment

    can anyone write his code here??after the contest ofcourse..I just wanna take a look at the code as i was unable to complete the problem..:)

No more comments