rng_58's blog

By rng_58, history, 6 years ago, In English

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!

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

| Write comment?
»
6 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Thanks for creating such awesome platform and Quality problems

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    6 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    do we have to update as well

    • »
      »
      »
      6 years ago, # ^ |
      Rev. 2   Vote: I like it +1 Vote: I do not like it

      If you installed it via Firefox' AMO or Chrome's Web Store, it will automatically update somewhere in the next 5-24 hours (Chrome checks for updates every 5 hours, Firefox every 24 hours).

      If you installed manually by downloading the packaged zip from GitHub and unpacking it in your browser, you would probably not be asking this question, but then you obviously also need to update manually.

      • »
        »
        »
        »
        6 years ago, # ^ |
          Vote: I like it +3 Vote: I do not like it

        Thanks for creating such awesome plugin really helpfull for java users

»
6 years ago, # |
  Vote: I like it +34 Vote: I do not like it

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

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +27 Vote: I do not like it

    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.

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    It was clearly mentioned in the email invitation that it starts 30 minutes earlier. Quoting from the email : "Time: July 1st (Sunday), 20:30 JST (This is 30 minutes earlier than usual.)" ..

    • »
      »
      »
      6 years ago, # ^ |
        Vote: I like it -11 Vote: I do not like it

      Who cares about email invitations?

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    When low and high are about 1018 your code will overflows.

    • »
      »
      »
      6 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thanks for quick reply, I should have taken care of such a silly mistake!!

  • »
    »
    6 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You could have used simple binary search. I felt binary was more intuitive. Also since range of elements was from 1 to 1e9 so checking for b in range outside [-1e9,1e9] won't help. Check this if interested : Link

    • »
      »
      »
      6 years ago, # ^ |
      Rev. 3   Vote: I like it 0 Vote: I do not like it

      I used ternary by comparing f(mid-1) and f(mid). In a way, it's a binary search, Code!

»
6 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

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(Bib) never increases.

How can we show that?

  • »
    »
    6 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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.