By Ramprosad, history, 10 months ago, ,

https://codeforces.com/contest/1197

https://codeforces.com/contest/1197/problem/C

Before this contest started, I have learned and implement the dp optimization IOI 16 Alien Trick. When I see the problem C, I thought this problem can be solved With the Alien trick. Then I started trying to solve the problem and finally I got Accepted verdict. This Problem can be solved simply using sorting the difference of adjacent element. Maximum Contestant has solved this with sorting. When I saw that all Contestant solve this problem very easy way, I became very surprised. But I am happy , because I could apply the trick first day in contest time.

This is my Solution.

https://codeforces.com/contest/1197/submission/57537548

Thanks to Everyone.

• +42

 » 10 months ago, # |   +72 Please do not be offended but this is so cyan.
•  » » 10 months ago, # ^ |   +46 this is so purple
•  » » » 10 months ago, # ^ |   +1 Can't argue with that.
 » 10 months ago, # |   +91 This is actually quite cool. I realized that I can compute the minimum of array using Li-chao tree. You can simply make $n$ lines $a_i \times x$ and query on point $x=1$!
•  » » 10 months ago, # ^ |   +16 You are right. Thank you. ko_osaga
 » 10 months ago, # | ← Rev. 2 →   +1 Where can I learn about this IOI Alien Trick ? Any Links ?
•  » » 10 months ago, # ^ |   0 I Learn this from a Bengali tutorial written by a Bangladeshi contestant Rezwan Arefin. This is the Link.https://rezwanarefin01.github.io/posts/ioi16-aliens-trick/Thanks.
•  » » » 10 months ago, # ^ |   0 Sorry but is there any english version of the same ? Google translate is not working properly..
 » 10 months ago, # |   0 Can you please paste this blog link to contest page?
•  » » 10 months ago, # ^ |   0
•  » » » 10 months ago, # ^ |   +1 No, what I meant was to leave a comment on contest announcement page that there is an alternative approach to solve this problem.
•  » » » » 10 months ago, # ^ |   0 OK. I will.Thanks for suggestion.timeles--S_O--dyssey
 » 10 months ago, # |   0 Das some serious shit right there