Блог пользователя divyanshu3012

Автор divyanshu3012, история, 12 месяцев назад, По-английски

I wnated to understand the difference between testcases and tests. In the problems given on codeforces , is it so that every test has several test cases inside it ? And the time limit mentioned in the problem is the time limit under which all the test cases must pass or is the time limit under which a single test case must pass ? And one more thing , in the submission section , is the execution time mentioned , the maximum time taken by the program I submitted ?

Please clarify ?

  • Проголосовать: нравится
  • +18
  • Проголосовать: не нравится

»
12 месяцев назад, # |
  Проголосовать: нравится +29 Проголосовать: не нравится

On Codeforces, in a majority of the problems you will see the following sentence "_The first line contains an integer t(1≤t≤10000) —the number of test cases._" You can think of a test as a single execution of your program, each of those tests has t testcases inside of it. The time limit mentioned in the problem refers to the maximum time your program can run on a single test. For example, during system testing your program will go through multiple tests. If your program exceeds the set time limit during any of those tests, you will not get an Accepted verdict.

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    So the time limit mentioned is for a single test. That single test can have many test cases inside it . In other words , the time limit mentioned is for all the test cases of a single test. Am I correct ?

  • »
    »
    12 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    So , a test is collection of many test cases and the time limit of 1s or 2s , etc hat is mentioned at the top of the problem is the time limit under which all the test cases collectively have to pass or in other words the complete test should pass ? Am I correct ?

    • »
      »
      »
      12 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Yes.

      • »
        »
        »
        »
        12 месяцев назад, # ^ |
        Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

        So , for example if a problem states that no of test cases , t = 10000 and the time limit is 2s , that means all the 10000 testcases collectively have to pass within 2 seconds ? That 2seconds are not for every test case each . Am I right ?