Open In App

Contest Experiences | AtCoder: Beginner Contest 289

About the Contest: AtCoder Beginner Contest – 289

This was a contest organized on the AtCoder platform on February 11th, 2023 (Saturday) and it consisted of 8 questions that were to be solved in a time frame of 100 minutes from 05:30 PM to 07:10 PM.

Prizes/Offers:



There were no such prizes/offers available for this contest.

Link of the contest: https://atcoder.jp/contests/abc289



Overview of the questions asked:

Problem name

Points/Scores

Difficulty Level

Pre-Requisites

Time to Solve

flip

100

Very Easy

Loop and Strings

2 min

V

200

Easy-Medium

BFS

10 min

Coverage

300

Medium

Bit-manipulation

16 min

Step Up Robot

400

Medium

Dynamic Programming

20 min

Swap Places

500

Medium-Hard

BFS

25 min

Teleporter Takahashi

500

Hard

2D- Matrix

unable to solve

Shopping in AtCoder store

600

Above Hard

Convex Hull Trick

unable to solve

Trio

600

Most Difficult

DP with Divide-And-Conquer

unable to solve

Problem 1: flip

This question is Straight Forward, for a given value string we just need to check if the character is ‘0‘ then print ‘1‘ or we need to print ‘0‘ .

Problem 2: V

The problem is to find the connecting component containing the minimum integer x. The connected components can be detected by extending the segment as long as it is connected to the minimum integer. If you have a good hands on graph topics like BFS and Disjoint Set Union , then it is a easy question for you.

Problem 3: Coverage

I enumerated all the ways to choose the sets with a technique called bit brute-force. Then extracting the i-th bit of the integer x can be found as (x >> i) & 1 ,i.e. right-shift and logical product operators, which enabled me to convert from an integer to a set correctly.

Problem 4: Step Up Robot

I used the states of DP to solve this question, where I need to Suppose that the robot is at the k-th step. Whether the robot can reach the lth step is independent of the history of its move so far. Then just kept on using this DP state to get the solution.

Problem 5: Swap Places

I solved a sigma equation to solve this question using the BFS traversal of the graph in the given numbers. The answer can be found with BFS (Breadth-First Search) in an O(the number of vertices + edges of G). This was a little lengthy and hard question for me to solve. It took a lot of time but finally was able to crack it.

Problem 6: Teleporter Takahashi

It was really a hard problem and I was not able to solve it in the contest. You need determine that the number of moves is even or odd and then choose according to that while making a move in the coordinate system.

Problem 7: Shopping in AtCoder store

It was really a difficult level of problem to be solved in such less time and I was not able to solve it in the contest. The problem is solves as a maximum value problem of the y coordinates of the intersections of x coordinate and the set of lines in the xy-plane. The Convex Hull Trick is an algorithm to manage a set of lines by tracking a convex region.

Problem 8: Trio

It was really the most difficult problem that I encountered in the contest and I was not able to solve it in the contest. This problem was a question of inverse of polynomial. Where you need to apply DP with Divide-And-Conquer FFT (Fast Fourier Transform) to solve the question in given time constraints.

Conclusion:


Article Tags :