#include "robot.h"
// ({actual, izquierda, abajo, derecha, arriba}, color, moverse)
void program_pulibot()
{
//adelante
set_instruction({0, -2, 0, 0, -2}, 1, 'E');
set_instruction({0, 1, 0, 0, -2}, 1, 'E');
set_instruction({0, -2, -2, 0, 1}, 1, 'E');
set_instruction({0, 1, -2, 0, 0}, 1, 'E');
// obstaculo
set_instruction({0, 0, 1, 0, -2}, 1, 'E');
set_instruction({0, 0, -2, 0, 1}, 1, 'E');
set_instruction({0, -1, 1, 0, -2}, 1, 'E');
set_instruction({0, 1, -1, 0, -2}, 1, 'E');
set_instruction({0, -1, -2, 0, 1}, 1, 'E');
set_instruction({0, 1, -2, 0, -1}, 1, 'E');
set_instruction({0, -2, -1, 0, -2}, 1, 'E');
//abajo
// ({actual, izquierda, abajo, derecha, arriba}, color, moverse)
set_instruction({0, 1, 0, -2, -2}, 1, 'S');
set_instruction({0, 0, 0, -2, 1}, 1, 'S');
set_instruction({0, 1, 0, -1, -2}, 1, 'S');
set_instruction({0, -2, 0, -1, -2}, 1, 'S');
//arriba
set_instruction({0, 1, -2, -1, 0}, 1, 'N');
//terminar
set_instruction({0, -1, -2, -2, 1}, 1, 'T');
set_instruction({0, 1, -2, -2, -1}, 1, 'T');
set_instruction({0, 0, -2, -2, 1}, 1, 'T');
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |