Блог пользователя rng_58

Автор rng_58, история, 8 лет назад, По-английски

In this post I introduce the existence of https://beta.atcoder.jp/. It's a bit more advanced than atcoder.jp, and usually it's also faster to load.

This is an example of beta version of contest page (tomorrow's ARC). For example you can filter your friends in the standings. Please use it!

  • Проголосовать: нравится
  • +163
  • Проголосовать: не нравится

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Thanks for creating such awesome platform and Quality problems

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Add an api please c:

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Thanks for posting it here, I've updated Competitive Companion to work with the beta platform aswell.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +34 Проголосовать: не нравится

I think beta is available for quite a while. Is there a reason why it doesn't replace old site?

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +27 Проголосовать: не нравится

    I know the reason. There are some contests for some companies' recruitment. It's usually for Japanese. For participating this type of contests, it needs application forms (ex. real name, where are you live, when are you going to graduate). The reason for not replacing old site is, the forms are not supported in beta version.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Could you please make announcements when rounds are rescheduled at unusual time?

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

For Problem Linear Approximation, I was using ternary search approach to find answer. At start of contest, My low and high limits were -2e18 and 2e18 respectively. Constantly, I was getting WA. At the last minute of contest, I changed limits of low = -1e10 and high = 1e10, and don't know what but it got accepted.

Can anyone check this codes and tell why Code1 gets WA and Code2 gets AC ?
Code1, getting WA
Code2, getting AC

»
8 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

The editorial to the problem Linear approximation states:

This is because, if b is not the median, if we continuously change b to the direction of the median, the sum of abs(Bi−b) never increases.

How can we show that?

  • »
    »
    8 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    Firstly, decrease each Ai by i. The problem is equivalent to find minimum value of

    S = |A1 - b| + |A2 - b| + ... |An - b|

    Using the triangle inequality, S ≥ |A1 + A2 + ... + An - n·b|. Let's divide it into two cases, A1 + A2 + ... + An - n·b ≥ 0 and vice versa. In the first case, we get and we want larger b. In the latter case we get and we want smaller b. So with checking two values of b is enough to solve the problem.