Getting Started with Competitive Programming
(an NPTEL course)
Home ⸱ Quick Links ⸱ Grading Policy ⸱ References ⸱ FAQ ⸱ Feedback ⸱ Connect ⸱ Credits
Module Z. Extras
Here is a list of a few more ad-hoc and implementation based problems that you can try!
- AtCoder Beginner Contest 209 — AtCoder Beginner Contest 209, Task B
- Food Chain — CodeChef Starters 7 Division 3
- UVA 00725 - Division
- Wonderful Coloring — Codeforces Round #734 (Div. 3), B1
- Snapper Chain — Google Code Jam 2010, Qualification Round
Just follow along with the problem statement :) You can either reduce prices one by one, or just subtract N/2 from the sum directly to estimate the discounted cost.
Execute repeated division for a log-number of steps.
This one has a straightforward brute-force solution involving going over all possibilities.
A simple observation determines the answer and you just have to return the right expression.
Hint: think about a bitstring that represents the states of the chain, and how snapping causes this bitstring to evolve.
super-embed:<div id="hyvor-talk-view"></div><script async defer type="text/javascript" src="//talk.hyvor.com/web-api/embed.js"></script>