t.muttaqueen's blog

By t.muttaqueen, history, 6 years ago, In English

This a problem from UAP NCPC 2016. link: problem uva-13084

In short the description is:

A point in a n*n grid (n is maximum 5000) is considered troublesome if there exist another point in the grid which creates angle less than atan(1/k) and it is more than 0 degree where n^2<=k<=2n^2 with respect to the upper two corners. In the above picture C is a troublesome point. Output all the troublesome points in the grid. There are at most 10 test cases. No idea How to solve this problem. Any help?

Full text and comments »

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

By t.muttaqueen, history, 6 years ago, In English

Hello, This is a problem from dhaka regional'15

problem link: Honey King

In short, in a different kind of 2D plane you are given some points(10^5 maximum) in the plane. find the minimum hexagon such that all points lie inside the hexagon.

So for a cell (x, y), there are six surrounding cells, up(x, y − 1), down(x, y + 1), up_left(x − 1, y), down_right(x + 1, y), up_right(x + 1, y − 1) and down_left(x − 1, y + 1). For points (0, 0), (−1, 0) and (−2, 2), This is the hexagon witch includes minimum number of inner hexagons. Output the minimum number of inner hexagons. so 7 is the answer in this case.

Please give me some hints.

Full text and comments »

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