Dropped Frames
Easy · rating 1000 · Arrays
A game targets fps frames per second, so each frame's budget is 1000 / fps milliseconds. The first line has n and fps. The second line has n frame times in milliseconds. Print how many frames missed the budget (took strictly longer than 1000 / fps ms).
Constraints: 1 ≤ n ≤ 105, 1 ≤ fps ≤ 1000
Related problems
- Account Balance — Easy
- Best Time to Buy and Sell Stock — Easy
- Count Above Average — Easy
- Health Bar — Easy
- Merge Two Sorted Arrays — Easy
- Restock Alert — Easy