CodingBeast23's blog

By CodingBeast23, history, 4 years ago, In English

First time I am trying to set problems for a local coding event. I will happy to hear regarding suggestion for generating test cases in bulk. like in terms of 10^5 numbers.

Thanks.

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

| Write comment?
»
4 years ago, # |
Rev. 3   Vote: I like it -12 Vote: I do not like it

try random number

you can use my code to generate testcases in multiple files at once

you can use this code to solve multiple test files at once.

please ignore my template in second code.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    Really bad way of generating random values. Let me explain why:

    RAND_MAX is around $$$3*10^4$$$. It cannot generate anything bigger than that therefore, cannot generate up to $$$10^5$$$.