r3hab.rs's blog

By r3hab.rs, history, 16 months ago, In English

long n1 = in.nl(); long[] brr = in.arrnl(n1); Arrays.sort(brr); long ans = brr[0]*brr[1]; long ans1 = brr[(int)n1-1]*brr[(int)n1-2]; out.pl(Math.max(ans,ans1)); why this code is incorrect and if same logic in working in c++ but not in java

  • Vote: I like it
  • +7
  • Vote: I do not like it