close

 
 
 
 
Problems
Image
 
 
# Name    
A
standard input/output
1 s, 256 MB
Submit Image x21051
B
standard input/output
1 s, 512 MB
Submit Image x16374
C
standard input/output
2 s, 512 MB
Submit Image x6370
D
standard input/output
2 s, 256 MB
Submit Image x4271
E1
standard input/output
2 s, 512 MB
Submit Image x1171
E2
standard input/output
2 s, 512 MB
Submit Image x323
F1
standard input/output
3 s, 512 MB
Submit Image x321
F2
standard input/output
3 s, 512 MB
Submit Image x25
Complete problemset
 
 
 
 
Questions about problems
Image
 
 
  Question Answer
2025-03-23 09:59:07
Announcement
Problem C. Dining Hall
*****

1. Clarification about distances:

The distance from a cell to a table is defined as the distance to the nearest unoccupied cells on that table. The distance between two cells is calculated as the number of times one needs to move to an adjacent cell sharing a side. Note that it is not allowed to pass through cells that belong to tables, except for the final move (this move places you onto the final cell on the table).

2. Clarification about the picture:

The distance from the first guest to cell (1, 1) is 2, so they choose that one.

For the second guest, the distance to cell (1, 2) is 3, the same as to cell (2, 1), but since 1 < 2, they choose cell (1, 2). There are no additional constraints.

For the third guest, the distance to cell (2, 1) is 3, so they choose it.

For the fourth guest, the distance to cell (1, 4) is 5, so they choose it.

For the fifth guest, the distance to cell (4, 1) is 5.

For the sixth guest, the distance to cell (1, 5) is 6, the same as to cell (2, 2), but since the x-coordinate is smaller, they choose it.

2025-03-23 09:07:03
Announcement
Problem C. Dining Hall
*****

The definition of t_i = 0 and t_1 = 1 was initially swapped in the problem. So that's right, if t_i = 1, then they sit at the nearest table, where there is at least one more seat, and if t_i = 0, then at a table where no one is sitting.

The distance is defined as the distance in a graph where we can only walk through neighboring cells that are a corridor.