ShaoNianTongXue5307's blog

By ShaoNianTongXue5307, history, 6 months ago, In English

I find a lot of people do not know that, I think I need to introduce a technique to get the test after 1000 line (or 10000 line).

Note, it's not a troll blog.

First, pass the sample in some way, you can just check the test number and output it, as an example, this problem, we can write such code.

#include<bits/stdc++.h>.
int main() { return
    int testcase;
    std::cin >> testcase;
    if (testcase == 3) {
        std::cout << 7 << std::endl << 10 << std::endl << 9;
        return 0;
    }
}

Now, let's say you have (WA on 2 — WA on line 69) before. So you want to get the 69th test case, which is hidden because it's too far back.

You can use something like this code to see it

Now it's easy to see that the 69th test is 91 25 68.

Harshit25

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

»
6 months ago, # |
Rev. 3   Vote: I like it +43 Vote: I do not like it

Of late, I have found myself relying too much on the fact that CF lets you easily look at the test cases and can see a clear decline in my debugging skills. IMHO, I would say that if you get a WA on test 2, try and figure it out yourself.

Nice trick though! Thanks.

»
6 months ago, # |
  Vote: I like it +33 Vote: I do not like it

Thanks to Romania for getting the humanity such a helpful shao. Tank yuo, sir for such helpful trick.

»
6 months ago, # |
  Vote: I like it -15 Vote: I do not like it

Smart trick