Kirill And The Game
source link: https://codeforces.com/blog/entry/54151
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
I want to Know what's the answer for this Problem And What's the technique to solve with ? http://codeforces.com/contest/842/problem/A
5 years ago, # | Just make a for loop from l to r, i for example. Then you should check if i / k is between x and y and also if i / k is an integer (people who didnt check this were hacked). If this statement will be true at least once then answer is "YES", otherwise "NO". |
5 years ago, # |
|
5 years ago, # | A simple linear search in [x, y] (the given range for the cost) If, for at least one value , i * k (where k is the efficiency required) lies in the range of the experience ie. [l, r], the answer is "YES" otherwise "NO". Time complexity of this solution is O(y - x) |
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK