aajjbb's blog

By aajjbb, 12 years ago, In English

Hello, I'm getting WA in Test 3 in Codeforces Round 146 — B — Easy Number Challenge, In my computer (Windows 7 Professional — JDK 1.7.9) my Code gives the right answer (3076687) in both Eclipse and IDEA IntelliJ, and I tried submissions in both Java 6 and Java 7. Does someone know what's wrong ? Thanks in advance.

Submission Link 1 Submission Link 2

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

| Write comment?
»
12 years ago, # |
  Vote: I like it +3 Vote: I do not like it

I found you error.

Code run: http://ideone.com/Nb3DW1

   int a, b, c;
// Ambiguous reference to a,b,c
        public Triplet(int a, int b, int c) {
            int[] tmp = {a, b, c};
            Arrays.sort(tmp);
            a = tmp[0]; b = tmp[1]; c = tmp[2];
        }

 public int a, b, c;
 //No Ambiguos reference to a,b,c.
        public Triplet(int a1, int b1, int c1) {
            int[] tmp = {a1, b1, c1};
            Arrays.sort(tmp);
            a = tmp[0]; b = tmp[1]; c = tmp[2];
        }
  • »
    »
    12 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thank you, it was the real mistake. shame on this kind of error.