Ravenclaw_OIer's blog

By Ravenclaw_OIer, history, 3 months ago, In English,

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.

Read more »

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

By Ravenclaw_OIer, history, 4 months ago, In English,

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

Read more »

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

By Ravenclaw_OIer, history, 8 months ago, In English,

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...

Read more »

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

By Ravenclaw_OIer, history, 9 months ago, In English,

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.

Read more »

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

By Ravenclaw_OIer, history, 9 months ago, In English,

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.

I think that the answer is NO, but I am unable to prove it or construct such groups. Please help me :D

Read more »

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

By Ravenclaw_OIer, history, 16 months ago, In English,
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?

Read more »

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