THAT70sSHOW's blog

By THAT70sSHOW, 10 years ago, In English

Which of the two sequences is lexicographically smaller ?

A = { 11 ,11,17,61 }

B = { 3 , 3, 5,89 }

Source : Problem 10419 — Sum-up the Primes ( UVa Online Judge )

For 2 Sample which is correct A or B.
 Please Help.
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

B < A, because 3 < 11.

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think so too , but in the question which is linked for sample case 2 , A is considered as lexicographical smaller than B

    • »
      »
      »
      10 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      OK, maybe you should compare strings (11+11+17+61 vs 3+3+5+89) instead of sequences in that task...

      • »
        »
        »
        »
        10 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Yep , you are right .. I guess the statement is a bit ambigous. Thanks for you help ..