Find the minimum number of steps that the robot must take to collect at least one ghetto of each color and return to the starting position.The entry data:
M N divided by a col-in line gap and column and grid
“”The point is a empty square.
“X” (Title X) means the starting position of the robot.
"R" (head R) represents a square with a red mark,
“G” (Title G) represents a square with a green ghetto,
“B” (Title 😎 represents a square with a blue ghetto.The example:
and a)
Input3 3
by G.B
of X.R – Output
8
b)
The Input6 5
by GGRG
...
X...
...
B...R
B.RRR Output
14
c) 11 15
X...R...
........................
........................
........................
...G...B
........................
........................
........................
........................
........................
R.G.B. ... output
28
Successfully developed program is considered:
1) Written on the listed in the name of the JAP project
You have to pass 10 tests:
2) at the time of implementation of the program;
2) Correct implementation of the program
Tests are ordinary text files.3) Plagiarism should not be
* Reading is done with the standard input flow
Client's review of cooperation with Anton Trotsenko
Java/Python/C++ Graphs, brute forceWe have already worked together, everything works great, quickly and efficiently.
The previous review is also up to date.
Freelancer's review of cooperation with Ihor Petrenko
Java/Python/C++ Graphs, brute forceWe are working for the second time. Everything is great! I recommend cooperation!
-
568 28 2 I have already worked with you. I will work on C++ during the day.
I will be happy to cooperate!
-
108 Good day ! I do everything on C++. To discuss the details, write to ls.
-
160 5 1 Good day
I will perform the task according to the input conditions.
Writing in Private
-
68 1 0 Hello to you!
Interesting task, ready to fulfill in accordance with all requirements.
-
Есть ли какие-то ограничения на M и N? Какие ограничения по времени?
-
Current freelance projects in the category C & C++
Residential Proxy Infrastructure EngineerWe're building a residential proxy network from scratch — fully owned, no third-party suppliers. We need one exceptional network engineer to build the entire technical foundation. What you'll build: - Android background SDK that routes proxy traffic through user devices… C & C++, DevOps ∙ 2 days 13 hours back ∙ 12 proposals |
Improvement in the existing version of 1C retail block for the distribution center (DC)In general, I will explain what kind of database we have - There is a main server where there is a retail database (where all receipts are recorded) - a UTP database - where all sales are transferred - it calculates the markup and stock balances - small databases of retail… C & C++, C# ∙ 3 days 3 hours back ∙ 6 proposals |
About the Master Program "KONSTRUCTOR"
4193 USD
We are looking for a very experienced C++ developer to modernize existing software (master program). The program is responsible for creating derivative software representing audio-visual sessions of psychological correction. The current version is written in pure WinAPI (Visual… C & C++, Desktop Apps ∙ 8 days 7 hours back ∙ 19 proposals |
Writing code for ArduinoIt is necessary to develop software for a weight dispenser based on Arduino Uno. Components: Arduino Uno R3 HX711 + load cell LCD1602 I2C display MAX7219 LED matrix 8x32 5 control buttons 4-channel relay 2 signal lamps Coarse dosing vibrator Precise dosing vibrator Operation… C & C++, Embedded Systems & Microcontrollers ∙ 9 days 15 hours back ∙ 15 proposals |
It is necessary to complete the project or provide consultation.
23 USD
|