### Ravenclaw_OIer's blog

By Ravenclaw_OIer, history, 3 months ago, ,

The virtual participation system is great. However, sometimes I want to simulate a contest more realistically, and simply testing system tests becomes a problem as some problem setters tend to have weak pretests.

So here is my solution: virtual participation will only test pretests by default, but you can still turn on system test mode. And when the participation ends, a "Run System Test" button will appear and you can run systests for your own submission, just like how TopCoder works.

• +38

By Ravenclaw_OIer, history, 4 months ago, ,

First things first, Codeforces blog system is awesome, however recently I had found a problem with it.

• -3

By Ravenclaw_OIer, history, 8 months ago, ,

Given a segment of length $1$, randomly pick two points $A$ and $B$, you are tasked to find the expected length of segment $AB$.

For Chinese readers, Chinese statement is here:

Chinese Statement

Someone says that it is related to the theoretical proof of Chtholly Tree, but I simply cannot understand why...

• +6

By Ravenclaw_OIer, history, 9 months ago, ,

Sometimes data structures save the day — in China we have a saying that basically means "Data structures make up for dumbness". However, data structures differ vastly. Many of them are not only useful, but also, in some ways, beautiful.

I now ask the community: which one, do you think, is the most beautiful data structure? It can be very short but elegant, or very long but easy to understand, or simply come with a sense of harmony.

• +93

By Ravenclaw_OIer, history, 9 months ago, ,

Suppose we have an indefinite equation about $x,y,z$.

$a^x+b^y=c^z$

If $(x,y,z)=(2,2,2)$ satisfies the equation, is there other such $(x,y,z)$ groups with $x,y,z \geq 2$ satisfy the equation?

Notice, that unlike Fermat's last theorem, $x,y,z$ does NOT have to be pairwise equal.

• +16

By Ravenclaw_OIer, history, 16 months ago, ,
int n;
cin>>n;
if (n==0)//deal with it
for (double i=0;i<=1/(double)n;i+=1e-9)//do something


It seems that, this code runs faster when n becomes larger...

When n = 109, the code will be executed once. When n = 1, it runs 109 times.

So I estimated it as O(n  - 1).

But, this means that this algorithm runs even faster than O(1).

How is it possible?