chrome's blog

By chrome, 10 years ago, translation, In English

Today will be held Single Round Match 637 at 19:00 MSK.

Let's discuss here problems after the contest.

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

»
10 years ago, # |
  Vote: I like it +4 Vote: I do not like it

On clicking on connect with all variations ranging from direct to Http tunnel A and B my Topcoder arena displays a message saying "A connection could not be established" . How do I fix it ?

»
10 years ago, # |
Rev. 2   Vote: I like it +20 Vote: I do not like it

I can't login to the Applet Arena :( It said "Your JRE does not support AES-128". What should I do? My OS is Ubuntu 14.04

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

    I also have the same problem hope we get a reply soon

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

    I also faced same problem. Then I cleared the java cache and downloaded the arena again. This has worked for me. :)

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

      no this is not the reason it was a common problem but fixed now

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

    Seems like everything is working now. At least for me :). Registered successfully.

»
10 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it

Configure Java >> View >> Remove Topcoder arena application >> re-download and run arena

»
10 years ago, # |
  Vote: I like it -8 Vote: I do not like it

i can not run java applet of TC in ubuntu can some one help please?

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

    so, round on topcoder will be unrated?))

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

    It seems if replace columns ".." by 0, ".#" by 1 and "#." by 2 then it is:
    http://acm.sgu.ru/problem.php?contest=0&problem=328

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

      No, it is not that. In our case 1 and 2 should not be adjacent while in the sgu problem it can happen.

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

        How? :)

        • "1 — black, 2 — white"
        • "It's not allowed to color two adjacent vertices with the same color"
  • »
    »
    10 years ago, # ^ |
      Vote: I like it +14 Vote: I do not like it

    But no one passed system tests :(

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

      Yeah, I wonder wth happened.

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

        у xellos'a за первый коммент +60 а за второй -46 *_*

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

      wrong tests?

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

    length of board == 1, :(. System test failed.

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

    Can i use Sprague–Grundy theorem? Isn't it only applicable with normal play convention?? In this case the person who does not have a move wins. Am i wrong?

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

      Yes, you could use it here.

      One can reformulate the game as follows: a move is valid iff it does not block the last left-to-right path. So the player who has not a move lose.

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

    Can anybody please explain me better than O(n^3) solution? I read the editorial of 335C problem which has a O(n^3) approach.

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

      I had an O(n) solution based on Sprague-Grandy Theorem.

      We split our rectangle into smaller rectangles as follows: If we have a column with 'x' then we divide rectangle in this column (the edge column is in both left and right rectangle). for example

      • ..x..xx..
      • x.......x

      is splited into

      • ..xx..xxxx..
      • x..........x

      Now. It's easy to see that our game is equivalent to the sum of games on smaller rectangles. There are three types of rectangles.

      Type A:

      • x....
      • .....

      Type B:

      • x...x
      • .....

      Type C:

      • x....
      • ....x

      One can prove by induction that nimber of A(n) = (n-1), nimber of B(n) = n%2 and nimber of C(n) = 1-n%2. [n is the width of rectangle]. So we just have to xor those numbers and we are done. There is one other case when there is no 'x' on the initial board. But in that case first player wins when n is odd and lose when n is even. (symmetry strategy).

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

I had problems with CodeProcessor plugin during contest. I had to debug by myself. Is there any problem with this plugin or is is a problem with my Java environment?

Instantiation error window says: Could not instantiate the editor CodeProcessor (see the java console for details). Switching to 'Standard' editor instead

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

Div1 250 is a perfect problem to demonstrate .NET LINQ:

public double calc(int[] a, int[] b)
{
    var sa = new SortedSet<int>(a);
    double ans = 0;
    foreach (int bb in b.Where(bb => bb != -1))
    {
        int x = sa.FirstOrDefault(aa => aa > bb);
        if (x == 0)
            x = sa.Min;
        else
            ans++;
        sa.Remove(x);
    }
    if (sa.Count > 0)
        ans += 1.0 * Enumerable.Range(1, a.Length * 2).Except(a).Except(b).Sum(
            bb => sa.Count(aa => aa > bb)) / sa.Count;
    return ans;
}

I don't know Python, but I bet code would be even shorter.

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

    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

    lol.

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

Can someone explain their solution for Div2 1000?

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

    Snuke wins iff there is an 8-connected path of red cells from first column to the last column.

    Build an oriented weighted graph, where each vertex correspond to a region from the board and there is an edge U->V with weight W if regions U and V are adjacent and region V has W cells. Add two more vertices source and target, source has edges to all regions having a cell in the first column with corresponding weight and all regions having a cell in the last column have edge to target with zero weight. Answer is the shortest distance from source to target.

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

      ффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффффф

      LOL

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

      Are you LOL (=

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

      Why the shortest distance will give the optimal answer ? I am not able to understand. Can you please explain ?

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

        Any simple path in the graph corresponds to a set of 8-connected regions in the grid and length of this path corresponds to the total number of cells in these regions. We want to find a set of connected regions which spans from first column to the last with minimal total number of cells, this is equivalent to finding a shortest distance from source to target in the graph.

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

          Got it. Thnx for the explanation :)