-emli-'s blog

By -emli-, history, 7 years ago, In English

AtCoder Beginner Contest 070 will be held.

Time:August 12th (Saturday), 21:00 JST

Duration: 100 minutes

Number of Tasks: 4

writer: Hec

Rating: 0-1199

The point values are: 100 — 200 — 300 — 400

We are looking forward to your participation!

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

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

My first solution for D (which use recursive DFS) got RE, so I had to rewrite a non-recursive DFS solution in order to get AC. Is it because of the low stack size limit for Python?

A bit unrelated, but I want to ask Python user how do you deal with problems that require Balanced BST? There is nothing similar to set, map in C++, and it's definitely not a good idea to re-invent the entire thing under the constrained time of the contest.

»
7 years ago, # |
  Vote: I like it +5 Vote: I do not like it

The editorial defines a struct instead of make_pair():

using edge = struct { int to; ll cost;};
vector<edge> tree[limit];

The main benefit I see is that you can reference the components by meaningful name like ".cost" instead of ".second".

Is there any other benefit?

p.s. That new syntax of "using" versus "typedef" is also cool.