Codeforces Round #119 (Div. 2) A. Cut Ribbon

Problem Link Polycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfills the following two conditions: After the cutting, each ribbon piece should have length a, b or c. After cutting the number of ribbon pieces should be maximum. Help Polycarpus and find the number...
Share:

Codeforces Round #345 (Div. 2) A. Joysticks

Problem Link: https://codeforces.com/contest/651/problem/A Friends are going to play console. They have two joysticks and only one charger for them. Initially first joystick is charged at a1 percent and second one is charged at a2 percent. You can connect charger to a joystick only at the beginning of each minute. In one minute joystick either discharges by 2 percent...
Share:

At Coder Educational DP Contest Frog 2

Problem Link: https://atcoder.jp/contests/dp/tasks/dp_b Problem Statement There are N stones, numbered 1,2,…,N. For each i (1≤i≤N) the height of Stone i is h There is a frog who is initially on Stone 1. He will repeat the following action some number of times to reach Stone N: If the frog is currently on Stone i jump to one of the following: Stone i+1,i+2,…,i+K. Here, a cost of |hi−hj| is incurred,...
Share:

AtCoder Educational DP Contest Frog 1

Problem Link:  https://atcoder.jp/contests/dp/tasks/dp_a Problem Statement There are span class="mjx-chtml MathJax_CHTML" data-mathml="N" id="MathJax-Element-36-Frame" role="presentation" style="border: 0px; box-sizing: border-box; direction: ltr; display: inline-block; float: none; font-size: 18.24px; font-style: normal; line-height: 0; margin: 0px; max-height: none; max-width:...
Share: