You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

**hilikportezlina****Member**- Registered: 2013-06-10
- Posts: 2

You are given N weights, the first weighs 1 pound, the second 2 pounds, and so on (the N weight weighs N pounds)ץ

You are given an N-binary-word that's formed by L's and R's and scales.

You need to provide an algorithm of N steps, which in each step puts a weight on on of the scales (the left or the right one), and that in the i-th step the scales will lean left if the i-th letter in the word is L and will lean right if it's R.

for example: if N=3 and the word is LLR then the algorithm should say:

1. put 2 on the left scale

2. put 1 on the right scale (the scales will still lean to the left)

3. put 3 on the right scale

Offline

**mathaholic****Member**- From: Earth
- Registered: 2012-11-29
- Posts: 3,247

Hi hilikportzelina, I don't get it. And, is this a game?

Mathaholic | 10th most active poster | Maker of the 350,000th post | Person | rrr's classmate

Offline

**hilikportezlina****Member**- Registered: 2013-06-10
- Posts: 2

no, it is not a game, it's a riddle or a puzzle. You need to find the algorithm

Offline

Pages: **1**