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

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

Hello, guys!

Recently ACM teams from the Baltic countries (Estonia, Latvia and Lithuania) have competed against each other in the programming camp which was held in Lithuania and was organized for the first time.

You are invited to participate in four competitions out of five in the Gym, which will be run for the four consecutive days starting from tomorrow.

Some problems in the camp were original, others were taken from old KTU contests (which are not in the Gym currently) or various local competitions that were not well-known for the participants of the camp. The competition of the day 4 was a mashup contest and consisted of Codeforces problems. As a consequence of this, it is skipped.

Have a good day and interesting contests :)

KrK

UPD: The slides of analyses which explain the solutions very briefly (some problems are not explained) can be downloaded here.

Теги ktu, gym
  • Проголосовать: нравится
  • +95
  • Проголосовать: не нравится

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

Nice:) Some link to the results of the competition mentioned above would also be interesting (if available).

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

Will there be editorials for the contests ? If not editorials then please give hints to solve the various problems.

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

Why did E from the last contest have so few solutions? It was really easy for geometry, just finding all points where the polyline crosses the polygon by brute force, sorting them in the order in which they appear on the polyline and summing up distances along the polyline between the (1st and 2nd), (3rd and 4th) etc (times 2 plus polygon circumference).

»
11 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +5 Проголосовать: не нравится

C."Reordering ones" from Day 5 isn't clear for me. Could someone explain its solution a bit more?

»
11 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +27 Проголосовать: не нравится

I'm fairly certain that some test cases for problem E of Day 5 are wrong (e.g., test 14)! Accepted solutions fail the following simple test case:

7 2
0 0
0 4
2 4
1 3
2 2
1 1
2 0
1 -1
1 6

The correct answer should be 21.656854.

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

Realy nice problems! I haveemoutions from our problems. But where Day 4 now? :(

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

It seems problem J from contest 5 test cases are not so strong. I have ACed with the following solution (also the same idea as in KrK slide):

  • Get any edge AB from convex hull
  • Find C nearest to AB. (angle ACB is greatest).

This seems correct, but it will fail when convex hull forms a triangle ABC and there are a lot of points in segment AB. Inside the triangle, add a point P:

A--X1--X2--X3--X4--B
| P
|
C

In this example it can be seen that A-X1-P is a solution, but if you choose X4-B from the convex hull, the circle going through X4, B, P will contains some points of convex hull.

Does anyone know how to handle this case correctly?

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

    If a point D is contained inside the circle A,B,C and is on the same side of AB as C is (as it must be as AB is a edge of the convex hull) that means <ADB > <ACB, contradicting C being the point maximizing ACB, right?

    If in your case we choose X4-B and C is within the circle through X4, B, P, then we would instead choose the triangle BCX4.

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

I may be misunderstanding something, but I found problem A from day 1 very confusing. 100735A - Strong parentheses sequence

In the first paragraph, it states that

(A) is considered a correct parenthesis sequence.

But it doesn't say that A must be a correct parenthesis sequence, and it sounds like anything that starts with ( and ends with ) is correct, for example, "(()".

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

    "A sequence is called a strong parenthesis sequence only if it on form (A), where A is a correct parenthesis sequence."

    ^This is a sentence mentioned in the problem statement itself which makes it pretty clear and unambiguous.

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

      I was talking about the def of a correct parenthesis sequence.

      A sequence is called a correct parenthesis sequence if it's the following form:

      • Empty sequence is considered a correct parenthesis sequence.

      • (A) is considered a correct parenthesis sequence.

      • XY is considered a correct parenthesis sequence, if both X and Y are correct parenthesis sequences.

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

I found the problem G day 1 has a weak testcase. My submission got a bit typo and yet still AC

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

Can you host the editorial file somewhere else? Its asking me to sign up which requires credit card details. I don't have a credit card. :(

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

In Day one, what is test case 14 in problem E ?

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

slide download link is not working

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

slides link is dead

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

cann't access the link