testlib icon indicating copy to clipboard operation
testlib copied to clipboard

C++ library to develop competitive programming problems

Results 37 testlib issues
Sort by recently updated
recently updated
newest added

Standard streams does not need to skip BOM, otherwise it will cause infinite waiting (blocking) in interactions.

The interactor seems always waiting for input, then exceeding time limit.

First random 64bit number always similar for similar seeds example program ``` long long base = 1e9; for(int k=0;k

Make a special flag while registering an interactor. If some violation happens (i.e. WA or PE), it should print -1 and exit, not just exit. Right now, I have to...

When I try to run this line of code: `rnd.next(INT64_MIN + INT32_MAX - 1LL, INT64_MAX - INT32_MAX + 1LL)` I get the next error: `random_t::next(long long n): n must be...

https://github.com/MikeMirzayanov/testlib/blob/d2880ce7b24d07c8ec5ba78619ed49552c4970bf/testlib.h#L673-L684 `long` is a different type on 32-bit and 64-bit platforms (as well as `unsigned long`). The problem can occur when using `rnd.any(...)` since it basically calls `next(container.size())`.

``` size_t casts to different types on different systems (32-bit and 64-bit) when passed to rnd.next. This implies different behavior of generator when, for example, size of std::vector is passed...

Priority-Medium
Type-Defect
auto-migrated

to = 2^64-1, from = 0, therefore to - from + 1 = 2^64 = 0 for unsigned long long. Is there any solutions to random in [0, 2^64-1] in...

One possible syntax would be: `bool has_n = has_opt("n"); // true if integer n is specified as key, false otherwise` `int n = opt("n", 100); // if integer n is...