By MikeMirzayanov, 14 years ago, translation, In English

According to The November Revolution of Colors and Titles, the text below is not an actual and just a historical document.

Not so long ago a new rating system was introduced at Codeforces. To complete the picture I’ll tell you about our Table of Ranks.

From this moment on all the participants will be given ranks that reflect their skills and abilities at such a hard field as computer science and problem solving. Judging by the results of previous rounds you will gain (or lose, I hope it’s not your case) points. If you score big success, you are promoted to a higher rank. You can see the dependence between rating and ranks in the table below. Moreover each rank has its color, which is reflected in the table.

RatingRank
0-1199Recruit
1200-1349Corporal
1350-1499Sergeant
1500-1649Lieutenant
1650-1799Captain
1800-1999Major
2000-2199Lt. Colonel
2200-2399Colonel
2400-2699General
2700+Marshall

As you have already noticed: we have only three captains in our regiment: vepifanovgusakovRAVEman. But I’m sure, after Codeforces Beta Round#3 we’ll have a number of promotions.

Wish you high rating,
MikeMirzayanov

Full text and comments »

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

By MikeMirzayanov, 14 years ago, translation, In English
Codeforces will be unavailable for up to 6 hours while we upgrade our infrastructure (March 3, 4PM - 10PM). Thank you for your understanding.

Full text and comments »

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

By ivan.popelyshev, 14 years ago, translation, In English

Intro

Every high school or college coach quickly comes to mind about his own online judge system. We can deal with huge systems like  e-judge or pcmc-2, we can make something our own like contester or acmp, but in any case to create a contest we should

Full text and comments »

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

By AndrewLazarev, 14 years ago, In English

Problem A. Winner


To solve the problem we just need accurately follow all rules described in the problem statement. Let's describe in more details required sequence of actions.
  1. First of all, we need to find the maximum score m at the end of the game. This can be done by emulating. After all rounds played just iterate over players and choose one with the maximum score.
  2. Second, we need to figure out the set of players who have maximum score at the end of the game. We can do this in the same way as calculating maximum score. Just iterate over players after all rounds played and store all players with score equal to m.
  3. And the last, we need to find a winner. To do this we will emulate the game one more time looking for player from the winner list with score not less m after some round.
This task demonstrates that sometimes it is easier to code everything stated in the problem statement, than thinking and optimizing.

Full text and comments »

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

By ivan.popelyshev, 14 years ago, translation, In English
Lets start from the end.

Problem С. Commentator problem

Let R be the distance from point А to a circle with center О and radius r. From this point the circle is observed at the angle .
So, the three stadiums are observed at the same angle if R1 / r1 = R2 / r2 = R3 / r3.
Take two different points A, B. The set of points C that AC / BC = const is either a line (perpendicular bisector of AB) or a circle with center somewhere on the line AB. This circle is easy to find. It contains two points that lie on AB and satisfy AC / BC condition.

Full text and comments »

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

By MikeMirzayanov, 14 years ago, translation, In English

As some users have already noticed - contest rating has been added to Codeforces. For now it is in beta too, but it looks very adequate. Here's how it is calculated.

Each person is characterized by their rating, the number R. If person A's rating is RA, and person B's is equal to RB, then the formula


gives the probability that A will get a higher position than B in the round final standings. By the way, here everything is very close to the Elo rating.

Before updating your rating after the end of the round, for each participant his seed is calculated, that is the place that the participant is expected to take in this competition. Thus, two things are known for each participant - his seed (the expected place) and rank (the actual place). Depending on the difference between these two values, your rating increases or decreases. If the difference is higher, your rating changes more.

There are a few technical points:

  • if it is the first contest for a participant, his seed is calculated as 1 + n / 2, where n is the total number of participants in the round;
  • changes in the ranking of contestants are multiplied by a correction factor such that allows the sum of ratings of the participants to remain unchanged (before and after the round).

As at TopCoder all users are divided into two divisions: the first (rating over 1500 1650) and the second (rating_ not more than 1500 1650). Not rated users fall into the second division automatically.

Wish you high rating,  

MikeMirzayanov

Full text and comments »

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

By MikeMirzayanov, 14 years ago, translation, In English

Thank you all for participating in Codeforces Beta Round # 2. I hope you enjoyed it. You may discuss the problems and system in comments. Please express your opinion, especially if you notice any inappropriate behavior. And as always, I will read with interest the suggestions for improvement.

Congratulations to the three leaders: RAVEman, GarnetCrow and ivan.popelyshev!

See you at Codeforces Beta Round # 3.

P.S. And by the way, the round tutorial is waiting for a volunteer. It is desirable that it will be one of the leaders of today's competition. The tutorial should be in Russian and in English. It will be published on the homepage and later will be available via special link from the contest page.

Full text and comments »

Announcement of Codeforces Beta Round 2
  • Vote: I like it
  • +1
  • Vote: I do not like it

By removed1, 14 years ago, translation, In English

Problem A.

The constraint that edges of each flagstone much be parralel to edges of the square allows to analyze X and Y axes separately, that is, how many segments of length 'a' are needed to cover segment of length 'm' and 'n' -- and take product of these two quantities. Answer = ceil(m/a) * ceil(n/a), where ceil(x) is the least integer which is above or equal to x. Using integers only, it is usually written as ((m+a-1)/a)*((n+a-1)/a). Note that answer may be as large as 10^18, which does not fit in 32-bit integer.

Most difficulties, if any, contestants had with data types and operator priority, which are highly dependant on language used, so they are not covered here.

Problem B.

Let each letter representation of column number be associated with integer in radix-26, where 'A' = 0, 'B' = 1 ... 'Z'=25. Then, when converting letter representation to decimal representation, we take associated integer and add one plus quantity of valid all letter representations which are shorter than letter representation being converted. When converting from decimal representation to letter representation, we have to decide how many letters do we need. Easiest way to do this is to subtract one from number, then quantity of letter representation having length 1, then 2, then 3, and so on, until next subtraction would have produced negative result. At that point, the reduced number is the one which must be written using defined association with fixed number  of digits, with leading zeroes (i.e. 'A's) as needed.

Note that there is other ways to do the same which produce more compact code, but they are more error-prone as well.

Problem C.

The points can be vertices of regular N-polygon, if, and only if, for each pair, difference of their polar angles (as viewed from center of polygon) is a multiple of 2*pi/N. All points should lie on the circle with same center as the polygon. We can locate the center of polygon/circle [but we may avoid this, as a chord (like, say, (x1,y1)-(x2,y2)) is seen at twice greater angle from center, than it is seen from other point of a cricle (x3,y3)]. There are many ways to locate center of circle, the way I used is to build midpoint perpendiculares to segments (x1,y1)-(x2,y2) and (x2,y2)-(x3,y3) in form y = a*x + b and find their intersection. Formula y = a*x + b has drawback that it cannot be used if line is parallel to y, possible workaround is to rotate all points by random angle (using formulae x' = x*cos(a) - y*sin(a), y' = y*cos(a) + x*sin(a) ) until no segments are horizontal (and hence no perperdiculares are vertical).

After the coordinates of the center are known, we use fancy function atan2, which returns angle in right quadrant: a[i] = atan2(y[i]-ycenter, x[i]-xcenter)

Area of  regular polygon increases with increasing N, so it is possible just to iterate through all possible values on N in ascending order, and exit from cycle as first satisfying N is found.

Using sin(x) is makes it easy: sin(x) = 0 when x is mutiple of pi. So, for points to belong to regular, N-polygon,

sin( N * (a[i]-a[j]) /2 )=0

because of finite precision arithmetic, 

fabs( sin( N * (a[i]-a[j]) /2 ) ) < eps


Full text and comments »

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

By MikeMirzayanov, 14 years ago, translation, In English
In this topic I would like to raise issues around Codeforces Beta Round # 1. What did you like? What is not liked? What seemed uncomfortable? What can be changed to make participation more comfortable?  I wonder your opinion on contest web-interface. 

Please do not write about access the site with the address http://codeforces.com/ (I recommended to use http://codeforces.com:8081/). I guess the problem is around of Apache Virtual Hosts + AJP Connector. Something is configured incorrectly or doesn't work properly because , then it works so good. In short, I will correct. 

I'm waiting for your comments. And, of course, welcome to Codeforces Beta Round # 2. 

Also I would like to see someone who wants to write contest tutorial. This must be done in Russian and English languages. Of course you must solve the problem on either contest, or in the practice. If you have a desire to do it - write in comments. Your post will be published on the main page and later available on special link available from the contest page.

Full text and comments »

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

By VladimirYakunin, 14 years ago, translation, In English
 
Those who has ever been to chinese market (especially if it was tourists oriented one) know that buying particular thing in China is something more than just pay-your-money-and-go-away.
Chinese sellers have a more artistic approach to their job. Who says any good has a fair price? In China fair price is a function of seller's mood, amount of leisure time the buyer has, current moon phase and Buddha's aura condition.
Here are some tips which were helpful for me and my friends in chinese markets:

Full text and comments »

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