FeiWuLiuZiao's blog

By FeiWuLiuZiao, history, 2 weeks ago, In English

This is my solution for 2040E - Control of Randomness. It passed the tests, but I’m not sure whether deriving the DP formula in this way (splitting the min, solving the equation, and then putting the min back) is rigorous.

More formally, if we have $$$x_0$$$ is the only number that satisfies $$$x_0=f(x_0)$$$, and so do $$$x_1$$$ and $$$g(x_1)$$$, can we say that $$$x=h(f(x),g(x))\Leftrightarrow x=h(x_0,x_1)$$$? What if $$$h(x,y)=\min(x,y)$$$?

This (used ChatGPT to translate)
Solution (original Chinese ver)

Full text and comments »

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

By FeiWuLiuZiao, history, 3 weeks ago, In English

https://arxiv.org/pdf/2411.19826

Amazed by the perseverance, intellect, and exploratory spirit of mathematicians.

Full text and comments »

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

By FeiWuLiuZiao, history, 4 weeks ago, In English

There are some functions $$$T_y$$$, which are defined as:

  • $$$\forall j\le 1,y\in (0,1):T_y(j):=1$$$
  • $$$\forall y\in (0,1):T_y(x):=T_y(xy)+T_y(x-xy)+1$$$

Find $$$y$$$ (s) so that the order of $$$\lim_{x\rightarrow+\infty}T_y(x)$$$ is minimized.

Full text and comments »

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

By FeiWuLiuZiao, history, 4 weeks ago, In English

If you have like 6 to 8 hours to do cp, but you can only do cp, what will you do?

Learn new algorithms (by videos / blogs )

Write blogs (about algos / problems )

Write codes (easy problems / difficult or challanging problems ) (problems with specified tags / random problems )

Full text and comments »

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

By FeiWuLiuZiao, 4 weeks ago, In English

When to use this:

  • getting Wrong Answer but don't know why, or in a non-real-time-feedback contest and to check whether your code is right
  • have a program to generate random input data
  • for standard problems: have a code that will not output the wrong answer (time limit exceedings are acceptable)
  • for special judge problems (example: problems that allow you to output one of the multiple answers): have a program to check if the answer is right
  • for interactive problems: too weak in coding to know how to use :( if you know, comment below plz ˋ( ° ▽、° )
  • if you are in a contest: make sure you have enough time to write these codes (data generator, bruteforce, checker, etc.)

You should have these files below in the same folder:

  • 1.cpp (or other languages): Your code that got Wrong answer.

  • For standard problems: std.cpp (or other languages): Code that will not output the wrong answer

  • For special judge problems: checker.cpp (or other languages): To check if your output is right, returns 0 in main() if wrong, and returns 1 if correct

  • gen_data.cpp (or other languages): To generate random input data

  • hacker.sh/bat (or other languages that can run bash/cmd command): main program

Details of implementation:

For gen_data.cpp: use mt19937 and chrono::high_resolution_clock().now().time_since_epoch().count() to generate random integer instead of rand() and srand(time(0)). Tutorial of mt19937

For Windows, standard problems, the hacker.cpp: (sorry for not knowing much about batch)

code

For Windows, special judge problems, the hacker.cpp:

code

For Linux/macOS, standard problems, the hacker.sh:

code

For Linux/macOS, special judge problems, the hacker.sh:

code

The main usage of this is to generate small-scale data for debugging.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By FeiWuLiuZiao, history, 7 weeks ago, In English

It's bad for training

Full text and comments »

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